Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

obtain an OAuth token

Summary: How to get the an OAuth token

We have a OCM instance setup for example https://OCMinstance

and we want to access the REST API for various tasks on the above instance for that we need to get the access token as mentioned in the documentation we can get the access token from a browser by hitting the URL https://OCMinstance/documents/web?IdcService=GET_OAUTH_TOKEN


but here we want the access token to be generated from CURL command , would you please help us here.

curl -X POST  \
https://<idcs tenantname that is protecting this service>/oauth2/v1/token \
-H 'Authorization: Basic <Base64 encoded clientID:clientSecret>'  \
-H 'Host: <IDCS BaseURL>'  \
-d 
'grant_type=client_credentials&scope=https://<ServiceInstanceBaseURL>:443/urn:opc:cec:all'

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!