In OAuth, how to get the access_token value from localstore file in Freshchat?

We are facing an issue related to the freshchat app, how to get the access_token value from localstore file and I want to display access_token value in my Freshchat app.

I had read the freshchat OAuth documentation but it isn’t mentioned how to retrieve access_token value in documentation.
https://developers.freshchat.com/v2/docs/oauth/

how to fix that issue. Is there any way to get access_token from localstore file?

.fdk/localstore file is attached

https://drive.google.com/drive/folders/1LhiNeYKSavuI1P3CtssAjRpgxuAgnH02?usp=sharing

Hi @mirza_has,
Welcome to the community.

access_token is sensitive information provided by the third party for authentication and it wouldn’t be advisable to show the value on the settings page.

Once the OAuth handshake is successful, the token is used by the app for sending along with the request wherever asked to.
For eg. isOAuth: true and headers = { Authorization: "bearer <%= access_token %>"}, Substitution of the token value is internally taken care by the platform.

Sample app references:
oAuth config: Link
Token Usage: Link

1 Like

Hi @Raghu_Murugesan

Thanks for your response.

App use case

I want to do authorize my freschat app with OAuth to access third-party applications (eg. facebook) after that I had an access_token, with access_token i want to get data from facebook page.

Yes I had tried the Request method to get the access_token value by including the isOAuth parameter in the options in my app but it is not working.

OAuth Documentation [OAuth]

Video is attached: link

App file code:
oAuth config: link
Token Usage: link

can you check my code? Is there any mistake?

Looking forward to your reply

1 Like

Hi @mirza_has,
with reference to attached video and facebook_app/iparams.html at main · Mirza-Hassan/facebook_app · GitHub isOAuth: true is used but the token is not referenced for the request calls. Can you check that? and also request is not made to Facebook

And with reference to facebook_app/app.js at main · Mirza-Hassan/facebook_app · GitHub oAuth is done with Facebook but the token is used for google.com.

Hope the above helps, let us know if you are still facing issues with the oAuth app

2 Likes