Mismatch redirect uri on requesting access token

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
kevala
User
Posts: 3
Joined: Mon Apr 27, 2020 4:31 pm

Mismatch redirect uri on requesting access token

Post by kevala »

When trying to request my access token programatically, I'm getting the following error: "invalid_grant: Mismatch redirect uri."

There are 2 other posts on the forum referencing this issue. One said to just remove the redirect uri, which may work but is not a viable solution for me because then responses would be sent to our production domain instead of my dev environment.

The other post mentioned that the datacenter URL may be incorrect and linked here: http://bullhorn.github.io/Data-Center-URLs/. I have tried all the US ones and they either result in the same error or don't respond at all. I don't know for sure what my datacenter is because when I log in to the app as described on that page, there is no cluster ID in the URL, it's just https://app.bullhornstaffing.com/. Upon investigating the network calls for that page, I THINK I'm in CLS42

ggaragiola
User
Posts: 9
Joined: Wed Feb 26, 2020 12:43 pm

Re: Mismatch redirect uri on requesting access token

Post by ggaragiola »

Hello,

I would start by taking a look at this article directly as it will walk you through step by step the process:

http://bullhorn.github.io/Getting-Started-with-REST/

Regarding the data center I can look that up for you. What is your company name?

kevala
User
Posts: 3
Joined: Mon Apr 27, 2020 4:31 pm

Re: Mismatch redirect uri on requesting access token

Post by kevala »

Our company name is Kevala. That's the article I'm using but it doesn't mention anything about that error and I believe my code is using that flow exactly. It works if I remove the redirect_uri, but as I said, I HAVE to include the redirect_uri in order to make it work in an automated way on my dev box.

kevala
User
Posts: 3
Joined: Mon Apr 27, 2020 4:31 pm

Re: Mismatch redirect uri on requesting access token

Post by kevala »

Just kidding, I was able to find the issue. By removing the redirect_uri from the access token call only (where it shouldn't be necessary anyway) my code works. This sentence in that page is clearly wrong: "If you specified a redirect_uri in the oauth/authorize request, you must specify the same redirect_uri in this request."

Post Reply