Generate API credentials with the REST API
This use case scenario provides the Identity REST API request for generating new API credentials.
These requests revoke the current API credentials and return the API ID and API key for the new credentials. You must include the --json
parameter to force the requests to send the Content-Type: application/json
in the HTTP header.
Generate API Credentials for Your Account
Send the following request to generate new API credentials for your account:
http --auth-type=veracode_hmac --json POST "https://api.veracode.com/api/authn/v2/api_credentials"
Generate API Credentials for an API User
To send this request, you must be the administrator for the specified user.
Use the following request to generate new API credentials for the API user you specify for userId
:
http --auth-type=veracode_hmac --json POST "https://api.veracode.com/api/authn/v2/api_credentials/user_id/{userId}"