Unable to get agent detail or group detail using our product API

Hi team,

I hope all of you are safe and doing well.

I get the following error in Tr***ie (customer) account when I try to get agent and group info using the following API’s:

error while getting module data { status: 400, response: '{"error":"invalid_request","error_description":"Missing required parameter(s): code, redirect_uri"}', headers: {}, errorSource: 'PLATFORM' }

Account ID: 1*****8

I tested the same in lworkers.freshdesk.com and it works fine there. I have also included staticIp: true in headers.

Thanks

@Manigandan_Ravi Thanks for sharing on the forum.

I see in the error description that, Missing required parameter(s): code, redirect_uri

  1. Are you building an custom app or marketplace app? Describe the nature of application that you are trying to build.
  2. It looks like the app is trying to use OAuth platform capability. Can you confirm if my assumption is true?
  3. May I know how the app is making requests to the mentioned endpoints? Is it making from the frontend or backend? Is it using Request API?

If you are able to; can you share the usecase or the problem that Trainline is trying to solve? A short 1-2 lines to help us understand the context would be fine :smile:

Hi @Saif,

  1. We have built a custom App for Trainline which will use OAuth for Integrating their surveyMonkey account with Freshdesk.

  2. we will fetch the agent info and group info from backend using $requests. We get the above error when we try to do this, but this works fine in one of my freshdesk account lworkers.freshdesk.com

@Manigandan_Ravi, Is the app in your account and Trainline’s account is run as an Custom App ?

Yes @Saif, the app is in my account and Trainline’s account running as a custom app

  1. Since the staticIP is enabled. Did the Trainline whitelist the relavant IP ranges?
  2. Also, do you see this error on whey you make request to above mentioned endpoints?
  3. Does the OAuth happens successfully?

cc: @Manigandan_Ravi

Thanks for the quick reply @Saif.

  1. Will check and confirm in this thread
  2. I am not seeing this error when I try from my account
  3. Yes OAuth happens successfully
1 Like

Hi @Saif,

They did whitelist the relevant Ip ranges .

Hi @Saif

Any update on this?

@Manigandan_Ravi I still don’t have valuable update to give you. Currently, since multiple teams are involved it’s taking a bit more time than expected.

You did the right thing by requesting an update. :smile:

1 Like

Hi @Manigandan_Ravi,

I will initiate a private message with you to collect some of the app details to futher proceed and solve the issue.

For the followers of this thread

  1. The following error is thrown then app makes a request to refresh the oauth access token.
  1. Looks like in this case, 3rd party vendor is expecting code, and redirect_uri as part of app’s request.
  2. When ever app makes a API call using the platform’s request api, from the platform there is a proxy which makes the request on behalf of the app. Also, the OAuth is carried on by the platform itself following RFC 6749 standard.
  3. However, in this case 3rd hasn’t been compliant to this standard which happens be causing this error at the moment.

UPDATE:
We are currently working to evolve OAuth platform feature beyond the RFC 6749 to enable to developers work with OAuth vendors who don’t follow RFC 6749 standards. Until then, current developers has been suggested to use middleware to solve this non-compliance.

1 Like