Getting an unauthorized error after refresh tokens through OAuth2

VladVanta
VladVanta ✭✭
edited 01/12/24 in API & Developers

I'm connecting with Smartsheet API through OAuth but getting an unauthorized error after refreshing the token, I see the fetch response is OK but get a 403 error when using the received access token.



Answers

  • Hi @VladVanta

    Is it possible that the account you're using does not have the correct permissions? Only licensed Smartsheet users on Business and Enterprise plans have access to the API.

    Here's the link to the oAuth Walkthrough documentation in case it helps.

    Cheers,

    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

  • Hi Genevieve, thanks for your answer. The account has access to the API.

    When I get the access token I can fetch the required data from the API properly, it supposes the access token remains valid from the generate time to the expiration time but looks like the access token is expiring before the `expireAt` field value. I get that error always when the token is close to expiring. I'm trying to renew the access token 1 day before the expiration time. I hope that will fix the error.