rest - Connecting to "CrewSense" API using ColdFusion, given cURL example -
i trying connect "crewsense" api (https://developer.crewsense.com/#introduction) coldfusion intranet. according documentation, first thing need request access token using cfhttp equivalent of following curl example.
curl -v https://api.crewsense.com/oauth/access_token \ -d "client_id=your_client_id" \ -d "client_secret=your_secret_key" \ -d "grant_type=client_credentials"
so tried following cfhttp request
<cfhttp url="https://api.crewsense.com/oauth/access_token" result="qresult" resolveurl="no" method="post"> <cfhttpparam type="header" name="client_id" value="your_client_id"> <cfhttpparam type="header" name="client_secret" value="your_secret_key"> <cfhttpparam type="header" name="grant_type" value="client_credentials"> </cfhttp> <cfdump var="#qresult#">
according documentation, if request successful , credentials correct, should receive json response in cfdump:
{ "access_token": "dzs3ieamp5ueac2i19kjyl8tbvsmgq9gapqpamjn", "token_type": "bearer", "expires": 1426274440, "expires_in": 86400 }
but instead, getting following error....
what doing wrong, if anything? or error on side?
coldfusion needed updated. once updated server, error disappeared. help.
Comments
Post a Comment