M
M
Maxim Yakovenko2021-07-04 16:33:44
OAuth
Maxim Yakovenko, 2021-07-04 16:33:44

How to connect server authorization to Odnoklassniki via OAuth2 protocol?

Can't get access_token after authorization. I use off as an instruction. page .
The first difference from the docks that I came across is that it is necessary to duplicate some of the parameters in the body of the POST request.

Further, in the request I use authorization_code . I always get an invalid identity type error in response:

{"error_description":"Invalid grant type","error":"invalid_grant"}


However, if you remove the grant_type parameter from the body, then an error arrives related to the incorrect application ID:
{"error_description":"Unknown client","error":"invalid_client"}
, although I was able to go through the previous step (authorization on the application side), and get a temporary code in the response.

Could someone describe how to get the expected behavior from the OAuth server Ok ?
If not, can you suggest an efficient way to reach support-a ?

Thank you all very much for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Petr Yelagin, 2021-12-29
@AlienZzzz

I still couldn't do it in the script, I did it through curl, tried all the launch options
curl -d post .json -X POST ' https://api.ok.ru/oauth/token.do?code=XXXXXX&grant... '
post file - same as in get requests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question