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'
Tagged:
0