We are facing an issue related to the Freshdesk OAuth access_token. I want to do authorize my app with OAuth 2.0 (third-party applications) after that I had an access_token, use the Request Method to pass access_token value by including the isOAuth parameter in the options. ‘Authorization’: "Bearer " + '<%= access_token %>'
but when i pass this access_token value in server.js file but it is not working it gaves error Unauthorized
how can i pass access_token value in server.js file? how to fix that issue. Is there any way to fix this issue?
To enable the platform to substitute access_token, quoting the documentation
You must use $request to make OAuth requests from the serverless component of the app to the third-party domain by including the isOAuth parameter in the options. Use the access_token variable to access the token
In the attached server.js link, $request is not used along with isOAuth parameter, can you address this and let us know if you are still facing the issue.
Thanks for your reply… it is working use $request in Request Method.
but I am facing an Freshdesk OAuth refresh_token.I want to do authorize my app Oauth after that I had an refresh_token, use the Request Method to refresh_token value in body parameter by including the isOAuth parameter ‘refresh_token’:’<%= refresh_token %>’, but it is not working it gaves error invalid_grant.
how can i pass refresh_token value in iparams.html file?how to fix that issue. Is there any way to fix this issue?
I hope you are trying the get the new access token once/if it is expired, you can reauthorize the app from the gallery using the settings icon of the app, and also platform automatically updates the access_token during the case of expiry using refresh_token. Let us know if this for some other use case.
Yes i am using Xero API (third-party application) in my app, pass an access_token value by including the isOAuth parameter in the options. but after 30min access_token expired Api is not working
From the logs we could notice calls to https://identity.xero.com/connect/token are failing with 400 status code, can you update the app resolving the same and try.
I must sure that xero api expires the token after 30 minutes and it works great in local. I was facing the issue specially after deploy the custom app, the api expires after 30 minutes.
Is it possible for you to test at your end and acknowledge me what is the issue at your end? and you told me that evertime i reauthorize to get the new token but i dont think its a good approach for client to go and reauthorize after every 30 minutes. Can you please suggest me good approach ??