Hello!
In the Developer Center docs, about Client Credentials, it says that the method to obtain the token is the following:
POST /oauth/token HTTP/1.1
Host: login.mypurecloud.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic BASE64(<client_id>:<client_secret>)
grant_type=client_credentials
However, I've seen this one works too:
POST /oauth/token HTTP/1.1
Host: login.mypurecloud.com
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>
This method is described in the OAuth2 specification docs, section 3.2.1, although it says that supporting it is optional and that it should not be the first option.
So, my questions are...
- It being supported, it is just a coincidence caused by the Genesys Cloud API using a library for OAuth that accepts this, or is it intended?
- Can we rely on this continuing to be supported in the future (with the corresponding Announcement if this changes)?
- If it is officially supported, shouldn't it be specified in the documentation?
Thank you!
#PlatformAPI
------------------------------
Adrián Santamaria
------------------------------