Answered

API in Postman

Hi, 


I'm trying to test the API in Postman but I am having some difficulty with authentication in Postman.  The images below are 1) the recommended curl from the api documentation and 2) how I am translating that to Postman.  I am using the example to prevent from posting any sensitive info, but I use my url and API key in the same format. 


Can anyone recommend how to get up and running in Postman?


image


image




Best Answer

Update :


The endpoint in the URL has to be your helpdesk url : ie.yourcompanyname.freshdesk.com . It wouldn't work if you're trying to hit domain.freshdesk.com


Cheers!


1 person has this question

Hello Patrick,


Looks like you're sending the BASE 64 encoded value of the credentials but I could see that you've included :X at the end of the value. The complete string of APIKEY:X has to be converted into BASE64 format and not the API KEY alone. 


You can make use of the Authorization tab wherein you can choose the type as BASIC Auth and enter the user name and password , which will be automatically converted to BASE64 in the request by POSTMAN.


Cheers!

Hi Aravind, I am also struggling to get this to work. My Postman setup is working fine with other APIs. But however I try to use API login (using the Authorization tab as you recommend) and all I get is: 


 

{
    "code": "invalid_credentials",
    "message": "You have to be logged in to perform this action."
}

 

I'm also trying the CURL command and I get the same results "Invalid Credentials"


I've been trying it with our API key:X (even resetting my API key) OR the username:password combination. And in BASE64. Still does not work - any suggestions?


Hello Adam,


I'll have this converted into a support ticket. It will help us to troubleshoot the case effectively.


Cheers!

Answer

Update :


The endpoint in the URL has to be your helpdesk url : ie.yourcompanyname.freshdesk.com . It wouldn't work if you're trying to hit domain.freshdesk.com


Cheers!

Adam/Patrick, did the solution above work for you two? I'm running in to similar issues...

Hi Mark, 


For the API just use the URL you need like https://mycompany.freshdesk.com/api/v2/contact_fields


image



That´s it. Hope this is a help.


Best

Sven

Hi,


I'm having the same problem here.

Where does the api-key need to added,? As a query parameter or in the url?

image


Hello,


it seems to be a bit different.

You need to use basic authentication but with the api-key as username and an X as password.

image



This worked for me.

Al the best and I hope it works for you.


Eric

Login or Signup to post a comment