Grant page is shown everytime

Hi, the grant page shown below appears everytime the user wants to use box. Is this the expected behaviour or is it my incorrect setup?

Screenshot from 2023-11-02 18-24-07

Hi @user112

Did you change the app settings between each attempt to log in ?
I think you can get this pop-up if you change the app settings in between. Especially if you change the scopes.

I encounter this pop-up every time I log in. Although I made changes to the app settings once, I have logged in multiple times, and this pop-up has consistently appeared. Is there a particular setting I might have overlooked?

Hi @user112

Most likely your app is not re-using the tokens given in the first authorization.

So the first time the user authorizes the app, and you get that screen.

In that process your app gets an access token and a refresh token, valid for 60 minutes and 60 days. You should store these tokens somewhere safe.

The second time, your app needs to get the tokens from before.

If the access token is still valid (< 60 minutes) then just use that.

If not, but the refresh token is still valid (<60 days), then use that token to get a new access token. Your app will also get a fresh new refresh token. Store these again, and use the access token

If your refresh token is expired, your app needs to go through the authorization process again.

Not sure if python is your things, but here is a sample app template that implement OAuth:

Let us know if this helps.