Skip to main content
Question

oAuth Redirect URI setup

  • May 22, 2025
  • 6 replies
  • 91 views

Forum|alt.badge.img

Hi - I am configuring an app with oAuth 2.0 JWT authentication. I have followed the steps mentioned in the box documentation, but I am unable to figure out where do I set the redirect URI. I did not find an attribute to set the URI.

 

I will appreciate any help.

 

Thanks,

Sid

6 replies

Forum|alt.badge.img

For JWT, there is none since the authorization step is done by the enterprise admin.


Forum|alt.badge.img

I am not sure I understand your response, let me explain what I am trying to achieve. May be I am doing it wrong.

1> We have an application in which a user can integrate with their box account

2> I have a link in our application, when the user clicks the link the system should navigate to box login and after the user is authenticated I expect the box to redirect back to the application with a code (that will be used to generate a token). The URL is https://account.box.com/api/oauth2/authorize?response_type=code&client_id={}&redirect_uri={}&state=box.

Currently when the browser navigates to above URL I am getting an error on the navigated box page 

Error: redirect_uri_mismatch 

 Show Error Details
  • response_type=code
  • redirect_uri={}
  • state=box
  • client_id={}

  I do not see any attribute to set the redirect URI in the Configuration tab on Box admin page?

 


Forum|alt.badge.img

i think in that case, you need to select "Standard Oauth2.0 (User Authentication)".  Then you'll be able to put a redirect url in the app.

 

BOX_vr2w7ijz7km0gxeoa3oafdh0otqlaqah.png


Forum|alt.badge.img

That did work, Thank you.

 

I want to blame it on the box UI, I didn't see it as an option 😉


Forum|alt.badge.img

What about when the redirect uri needs to point to RStudio running on a cloud deployment? How to I set redirect_uri in box_auth to something else than localhost?


Forum|alt.badge.img

Hi, I'm wondering how you figure out what the redirect uri should be when you put it in the configuration for the app?