Having trouble authenticating in Postman
I'm working on authenticating in Postman for an upcoming project and this is what I'm sending:
POST /auth/token HTTP/1.1
Host: oauth.wildapricot.org
Authorization: Basic {{API KEY GOES HERE}}
Content-Type: application/x-www-form-urlencoded
Content-Length: 40
granttype=clientcredentials&scope=auto
But I'm consistently getting a 401 Unauthorized error with this output:
{
"error": "invalidclient",
"errordescription": null,
"error_uri": null
}
I'm able to retrieve a token using the tool at https://api.wildapricot.org/ui/home/RequestOAuthToken and make calls using the API browser but, since I'm working on an integration with an existing application, I really need to be able to make a call on my own. Any hints on what I'm doing wrong here?
-
Neil Hinkle commented
Update:
I was able to get this working by switching to Basic Auth as much authentication method in Postman and passing the Client ID and Secret through it, then adding the username and password to the body and changing the grant type to password.
Hope this helps someone else that might be running into this issue!