Unable to complete the OAuth in Freshdesk

Hi Team!

I hope you are doing good :slightly_smiling_face:

I am trying to implementing the OAuth for Freshdesk Trustpilot Integration. Unfortunately, I am unable to get the access token :worried:. But I am able to successfully authenticate with Trustpilot :stuck_out_tongue:

I have created a developer application in Trustpilot and I got API key, API Secret, and Callback URL(For Testing http://localhost:10001/auth/callback, and for Production https://oauth.freshdev.io/auth/callback) and put those API key and secret in oauthconfig.json file.

I got Invalid state message once I have successfully authenticated with Trustpilot. I have added the screenshot below which I have received from Freshdesk :point_down:

Please help me out on how to get this resolved :handshake:

Hey Saravanakumar. Hope you are doing fine. I will connect with you through DM to get more context on what went wrong.

@Saravanakumar_Raju, Seems like Trustpilot is not sending back the state variable along with the Authorization code grant which our platform expects according to RFC 6749.

1 Like

Hi @Saif!

Thanks for your reply.

Could you please let me know what kind of value that state variable contains? Also could you please share some sample values? So that I can ask the same to the Trustpilot team.

A state value will be sent to Trustpilot during the initiation of OAuth by the app. Our platform expects is the same value to be returned along with code. That should help the team to look the requests made by our platform and pick up the state property.

cc: @Saravanakumar_Raju

1 Like

Thanks for the detailed explanation @Saif

When we tried neto integration by following the same procedure.(For the neto integration)

We are facing the same issue.

Here is code.

 "authorize_url": "https://apps.getneto.com/oauth/v2/auth?client_id=<%= oauth_iparams.client_id %>&redirect_uri=http://localhost:10001/auth/callback&response_type=code&store_domain=domain.neto.com.au&state=9876567890",
     "token_url": "https://<%= oauth_iparams.domain %>/oauth/v2/token?client_id=<%= oauth_iparams.client_id %>&client_secret=<%= oauth_iparams.client_secret %>&redirect_uri=http://localhost:10001/auth/callback&grant_type=authorization_code&code={access_code}"

Hi @Karuppu_Samy,

Do you mind creating a new topic describing your issue in detail ?

This way, I can have our team provide you resolution faster by seeking your problem specific information. :smiley: