Generating API Credentials with the Identity API
This use case scenario provides the Identity REST API command for generating new Veracode API credentials.
These commands 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 commands to send the Content-Type: application/json
in the HTTP header.
Generate API Credentials for Your Account
Use this command 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
note
To use this command, you must be the administrator for the specified user.
Use the following command 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}"