How do I set API authentication?
You can log in to Acoustic Content with Rest APIs and wchtools by creating an API key. The API Key is linked to your account whether the account has federated authentication or not. But if your content hub account has federated authentication, you must use the API key when you log in to the hub with the REST APIs or with wchtools..
Acoustic Content supports API log in by using the Bluemix® API key. API keys often act as both a unique identifier and a secret token for authentication. Usually, an API key has a set of access rights specific to the identity associated with the API key.
As an Administrator, you can create an API key in IBM Cloud that can be linked to your account. For detailed steps on how to create an API key, see Managing user API keys in IBM Cloud.
- User ID: apikey
- Password: the value of the API key that was presented to you, when you created the API key in IBM Cloud.
curl -v -u IBMidUser@domain.com:password https://my.digitalexperience.ibm.com/api/login/v1/basicauthcurl -v -u apikey:{insert your api key value here} https://my.digitalexperience.ibm.com/api/login/v1/basicauthWhere
the string apikey is used as your userid and you must
provide your api key value that was presented to you, when you created the
API key in IBM Cloud. The response to the log in request contains a Set-Cookie header containing the proper
x-ibm-dx-user-auth value for the user to set in future requests. The subsequent
requests are authenticated with the included x-ibm-dx-user-auth header.
x-ibm-dx-user-auth
value, which is used to authenticate subsequent requests you send. For example, you can set your
credentials and basicauth header in an authoring request as
followscurl -v -u apikey:{insert your api key value here} https://my.digitalexperience.ibm.com/api/authoring/v1/assetsFor
more information about authentication and making API requests see IBM API explorer.