OAuth issue

Hi there,

I have an issue obtaining an OAuth token from Yandex.Money API.
What I expect (similar to Facebook auth flow):

  1. The user initializes authorization of the application for managing his account.

  2. The App sends the Authorization Request to the Yandex.Money server.

  3. For the authorization request, the user is redirected to the Yandex.Money authorization page.

  4. The user enters his login and password, reviews the list of requested permissions, and either approves or rejects the authorization request.

  5. The authorization result is returned as an HTTP 302 Redirect to the App.
    The App must process the HTTP Redirect response. Example of the response for successful authorization:
    HTTP/1.1 302 Found
    Location: https://client.example.com/cb?code=i1WsRn1uB1ehfbb37

  6. If authorization was completed successfully, the App should immediately exchange the temporary authorization code for an access token.
    The response contains the permanent access_token.

Everything works perfectly until step 5.
The temp code in the url is not exchanged for a token at all. In step 5, immediately after Yandex responds, my App sends new Authorization Request and redirects the user back to the Yandex.Money authorization page (Step 2) and everything starts over.

Any ideas?

I’d appreciate any help!
Thanks.

Community Page
Last updated: