Search code examples
oauth-2.0yammer

yammer oauth error invalid redirect uri


We integrate with YAMMER using OAuth2.0 Server-side flow.

Some of our clients have subdomains so our redirect URI has to be dynamic. We set up the yammer-app to have a dynamic redirect URI as specified in the documentation. Our redirect URI looks like this:

https://example.com

Problem:

It works not every time! Some redirects to the YAMMER user authentication page are getting this error:

invalid redirect_uri

The URL looks like this:

https://www.yammer.com/dialog/oauth?client_id=XXX&redirect_uri=http://www.examle.com/yammer/callback

The error only happens some times so it is hard to reproduce or trace the reason.

I tried to remove the redirect url form the app setup on YAMMER. The error still occurs!

Does anybody encountered this problem as well? What could we do wrong?

Appreciate your help!


Solution

  • I found the solution. According to the documentation my first approach was correct. To use a dynamic redirect URL input the domain like this: https://example.com