Search code examples
oauth-2.0yahoo-api

Yahoo - OAuth2 - what is Error 95037?


I am trying to implement oauth2 for yahoo (target is yahoo's contact api). See here: https://developer.yahoo.com/oauth2/guide/#implicit-grant-flow-for-client-side-apps

However, I get the following error:

Oops. Yahoo is unable to process your request. We recommend that you contact the owner of the application or web site to resolve this issue. [95037]

How to get this resolved? It comes with I use response_type=token (which is needed for Implicit Grant Flow), but works fine for response_type=code

[EDIT] The request to yahoo (urldecoded):

https://api.login.yahoo.com/oauth2/request_auth?client_id=[CLIENT_ID]&response_type=token&redirect_uri=[PATH]&display=popup&scope=&state={"client_id":"[CLIENT_ID]","network":"yahoo","display":"popup","callback":"_hellojs_23g8z6wk","state":"","redirect_uri":"[PATH]","scope":"friends,basic"}

[UPDATE] After following the recommendations from HansZ., I was able to resolve it.

Now the issue has come back without changing any code. Basically, it only works when I am logged in with the Yahoo ID that I used to setup the App at Yahoo.

Otherwise, sometimes it goes in loops and chrome says

This webpage has a redirect loop`

rest of the time it gives the error again.


Solution

  • Your state is the problem. I can reproduce the problem by including your URL-encoded state in the authorization request for my Yahoo client. The problem is the length of the state or the total URL. You may revert to using a cookie for maintaining that state and send only the (much shorter) cookie name as the state parameter.