Skip to main content
Question

redirect_url_mistmatch

  • May 22, 2025
  • 11 replies
  • 32 views

Forum|alt.badge.img

below are my box details , i have configured all redirect uri in the dev console, but still facing redirect uri mismatch error, pls sugget.. 

 

for your awareness, i am adding all my details here

 

BOX1_q9Cw4GEJAD1Nkc80BrDFfw.png

 

BOX1_ttS4XX0kEUpeVC5gd84Y9g.png

 

const CLIENT_ID = "**************************;
const CLIENT_SECRET = "************************";
const GET_TOKEN_URL = "https://api.box.com/oauth2/token";
const GRANT_TYPE = "authorization_code";
 
 
BOX1_5Qkxm_lubJ7ZSDftdxiMRw.png

11 replies

Forum|alt.badge.img

Hello, 

This error is appearing due to the change that occurred back in November. 

You will want to make sure that whatever you are passing in via ${window.location.href} exactly matches a URI listed in the developer console configuration. 

Thanks.


Forum|alt.badge.img

I have the exact same issue. I have the exact same url passed in the authorizationurl which is listed in my app. Moreover, Box sends me back the same url which is listed in my app as the redirect_url in the error message. This is causing issues in my prod environment. 


Forum|alt.badge.img

But this was working with same til 2 days back.. We did not do ny changes from 6months, but why it is happending even we did not do any changes..

 


Forum|alt.badge.img

This is happening from yesterday only, same configurations htere since 6months, pls address my issue clearly, i am struggling and breaking my head.. its really messing my application

BOX1_2Qr4nx__LfJByUqwODJlvA.png

BOX1_GBnXCeRUyfNM0VMO0IUdDw.png


Forum|alt.badge.img

We released the strict checking change yesterday per this changelog


Forum|alt.badge.img

Facing the same issue. I get failures even though my redirect uri is an exact match.


Forum|alt.badge.img

395005653353 It solved my reading your change log, But I can able to add only maximum 10 urls, Our application is having 200+ urls ... how can we add them , pls guide.

 

what's the limit license wise..

 

Thanks

 

 

 

365368658128976668466

 

pls follow

 below

 

option1

if url is like this 

https:www.abc.com  --> add https:www.abc.com in dev console configuration

option2 :

if url is 

https:www.abc.com/xyz/temp=1 --. add enable=box from code level in ur application which should look like https:www.abc.com/xyz/enable=box&temp=1

and add below url in dev console in configuration tab

https:www.abc.com/xyz/enable=box&temp=1


send me kudos if this works... hahaha ..

 

 


Forum|alt.badge.img

someone pls help


Forum|alt.badge.img

6312586745875 We had similar issue as yours and we fixed it with below steps.
(1) Host a page in your app which can be accessed with static URL (example - http://localhost:3000/enable=box) and give it as redirect URI in box configuration.
(2) After login box will redirect to this page with code.
(2) Extract the 'code' from box in this page and redirect to the original page with passing code as a parameter. 
I hope this will help you. 


Forum|alt.badge.img

what if urls are dynamic

 

http://localhost:3000/sendback

http://localhost:3000/foward

 

we cannot add urls more than 10 in box config, pls help with an ex like above

 


Forum|alt.badge.img

Yes we had similar requirement.

- Before calling the box login set dynamic part of the URL in session OR localStorage OR state. (In your case 'sendback' or 'forward')
- set redirect_uri = http://localhost:3000/enable=box
- host one page in your app which will be loaded when box calls your redirect url (http://localhost:3000/enable=box)
- Extract the 'code' from box in this page and redirect to url with the dynamic part from session OR localStorage OR state and pass the code to that page in query parameter