Embed-url API throwing unauthorized error from Vercel env

I am fetching embed-url for my retool application and showing it on my nextjs project.
When I am trying to call 'api/embed-url/external-user' from the Vercel environment with the correct token and group_id, it is giving an 'unauthorized' error. However, it is working fine from the local environment.

Code Snippet: (token = "retool access token", groupId = "retool group id", user.uid = "our system's generated userId")

Response received from retool when running in local environment

Response received from retool when running in Vercel environment

Has anyone faced this issue? Or can help with this?
Would really appreciate the assistance.

1 Like

@Sohail_Rauf Where you able to resolve this in the meantime. I am dealing with similar behavior.

Just adding that our issue "solved itself" and the request go through alright now