Custom app shows 401 as status code when calling freshdesk api's

I have developed a frontend app, which calls the freshdesk api’s via request templates . this api’s calls are working fine and returning the response in development
but when i packed it and uploaded the zip file in developer portal and published it.
after installing the custom app , i see the freshdesk api calls fail with status code 401.

i have attached the response ss with this and the requests.json of my which calls the freshdesk api’s.

Hey @Marri_Sri_Rahul_Sidd,

From the error message, I see that it says “Invalid credentials” and 401 status is unauthorized. Please cross verify the api key from your Freshdesk instance.

Also, in the request templates - requests.json you can use the authorization header as Basic <%= encode(iparam.apikey) %>

Let me know if this helps.

hey @zach_jones_noel
here is the screenshot of my iparams.json apikey declartion

i console my iparams from app , console shows me correct apikey and subdomain which are my iparams for my app.

screenshot of consoling my iparams.json
Screenshot 2023-12-06 200224

hey @zach_jones_noel
can we see the logs of custom app installed to know the wat’s messing up the request?

thanks @zach_jones_noel
this Basic <%= encode(iparam.apikey) %>
solved the issue . but can we see the custom app logs??

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