Get OAuth Token for Client Credentials environments
POST {{HostName}}/oauth/v1/tokens
Use this API to request an oAuth token when the environment is a Client Credentials environment. You can see which oAuth flow an environment supports by looking at the Environment page in the OHIP Developer Portal. For more information see (Authenticating to Oracle Hospitality Property APIs)[https://docs.oracle.com/en/industries/hospitality/integration-platform/ohipu/coraclehospitalitypropertyapis.htm#AuthenticatingToOracleHospitalityPr-1BD54F80] under the heading Client Credentials-Based Authentication
.
To call this API you will need:
- To know the environment is a Client Credentials environment - see above
- A valid ClientId and ClientSecret
- A valid EnterpriseId
- A valid application key
Because of this, oAuth tokens may only be used when calling the given environment.
oAuth tokens expire after 60 minutes. We recommend obtaining a new oAuth token every 50 minutes, but not more frequently.
Request Body
[{"name"=>"grant_type", "value"=>"client_credentials", "datatype"=>"string"}, {"name"=>"scope", "value"=>"urn:opc:hgbu:ws:__myscopes__", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
x-app-key | string | ||
enterpriseId | string |