In OAuth, <%= access_token %> placeholder is not working as expected in Freshteam?

Hi There,

I tried to run a API call by using the access_token which is generated by using the freshworks oauth method. but it returns an unauthorised error (401).

i tried to send a access_token which is generated my app in local directly, without using the placeholder (<%= access_token %>) and its working as expect. When im using the placeholder the app is not working as expected can anyone help on this?

I have attached the my code FYR.

Is there any update on this?

Hi Bala,

Are you trying to run the app locally or have you deployed and tested it?

Thanks,

Hi @Bala_kumar

The app code you have attached doesn’t seem to have the request API snippets. I would want you to share with us the actual Request API snippet used on your app code or attach the proper app zip for debugging purposes.

Yes i have tried to run in local but its not working as expected.

I have updated a new code please check it here.

Hi @Bala_kumar

I’ve tested the app code that you shared in my local environment, It seems to be working fine in my local setup. Could you please check and confirm the credentials that you are using to authenticate has proper access?

Hi Bala,

I had the same issue while testing it locally, once check if the redirect URL is correct. I use to check by deploying to see if it is working in production if it working in production then we should change the URL to local setup.

After changing to the correct redirect URL it worked for me.

Thanks,

Hello, I have exactly the same problem since updating the FDK and switching to nodejs 14

However, I haven’t made any changes to my sources.

@Bala_kumar

Can you please ensure that you have whitelisted the URL in the manifest file? If not, that can be the issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.