Followed docs for the API-Version-8.
When I run a simple test with a OAuth2 Client
From the docs
Authentication with Client Credentials
POST /api/oauth/access_token
$ch = curl_init();
$header = array(
âContent-type: application/vnd.api+jsonâ,
âAccept: application/vnd.api+jsonâ,`
);
$postStr = json_encode(array(
âgrant_typeâ => âclient_credentialsâ,
âclient_idâ => â3D7f3fda97-d8e2-b9ad-eb89-5a2fe9b07650â,
âclient_secretâ => âclient_secretâ,
âscopeâ => ââ
));
$url = âhttps://path-to-instance/api/oauth/access_tokenâ;
curl_setopt($ch, CURLOPT_URL, url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, âPOSTâ);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$output = curl_exec($ch);
Using my corrected URL and client_id (also have to update the line for CURLOPT_URL, $url
The response is not a token.
I get
the response(output):
{âerrorâ:âinvalid_clientâ,âmessageâ:âClient authentication failedâ}
In the logs --> âPOST /{{INSTANCE}}/api/oauth/access_token HTTP/1.1â 401 67 â-â â-â
- How can I test and confirm the function of the v8 API ?
What other details should I provide? (php v7.2.4 , PCRE 8.41 ) SuiteCRM 7.10.2
Any pointers or additional details beyond the docs at https://docs.suitecrm.com/developer/api/version-8/ ?
thanks for your time