Getting 401Invalid credentials - You have to be logged in to perform this action

Hi team,

I was migrating my app from v2.2 to v2.3 while doing that i was getting 401 error while making api call to freshdesk

this is my iparams file

This is my request.json

This is the error message

Hey @Sathish_J,
I noticed in your requests.json you have the isOAuth: true which has to be used only when making OAuth-based request method invocations. And Freshdesk APIs don’t require OAuth so you can remove it as the default value is false.
Read more about OAuth - Freshworks Developer Docs | Use request method to access OAuth-secured resources

Let me know if you still have issues with request method invocation.

Hi @Sathish_J,

You have the Authorisation header incomplete as well. The API key for Freshdesk has to be Base64 encoded with the string value of “APIKEY:x” for basic authentication.
Change the Authorization header value to Basic <%= encode(iparam.freshdesk_api_key) %>. This will automatically Base64 encode with the “:x” value appended with the API key.

Find the sample app here.

Thanks @Raviraj. It worked

1 Like

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