F
F
Freezenex2021-02-20 11:07:09
Python
Freezenex, 2021-02-20 11:07:09

Application not exist error on POST request to graph.user.messages method. How to solve?

The code:


import requests
import json
group_access_token = "token here"
url = " https://api.ok.ru/graph/me/messages/?access_token= " + group_access_token
data = {"recipient":
{
"user_id": "user: 571289866623"
},
"message":
{
"text":"Hello"
}
}
headers = {'Content-type': 'application/json;charset=utf-8'}
r = requests.post(url, data=json .dumps(data), headers=headers)
print(r.text)

Error:

{"error_code":2000,"error_msg":"GRAPH_PARAM_ACCESS_TOKEN : Application not exist","error_data":null}

Explanation:

The token was received several times according to the instructions in the documentation. I checked and so on, but the error is the same.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question