Error Handling

This section summarizes the most common OAuth and CSC API errors, their meaning, and the recommended actions for troubleshooting and resolution.

HTTP/OAuth ErrorMeaningRecommended Action
400 invalid_grant
invalidCodeVerifier
The PKCE code_verifier does not match the code_challenge used in the PAR request, the authorization code has already been used or expired, or the redirect_uri does not match.Start a new PAR flow, generate a new PKCE pair (code_verifier and code_challenge), and verify that the redirect_uri is consistent.
401 invalid_client
invalidCredentials
Invalid OAuth client identifier or client secret, or an incorrect Authorization header was provided.Verify the client_id, client_secret, and the contents of the Authorization header.
401 for a Bearer requestThe access token (Bearer token) is invalid or has expired.Obtain a new access token intended for the specific operation.
403Insufficient scope, no permission to use the specified credential, or no valid signing authorization is available.Verify the user permissions, scope, selected credential, and authorized hashes.
400 from /signatures/signHashInvalid hash length, malformed Base64 content, unsupported algorithm OID, or a mismatch with the data approved during authorization.Verify the hash value, algorithms, credentialID, and the parameters used during the authorization (PAR) flow.

Troubleshooting Recommendations

 
If an error is received:

  1. Verify that the access_token has not expired.
  2. Verify that the redirect_uri exactly matches across all OAuth flow steps.
  3. Ensure that the code_verifier corresponds to the code_challenge used in the relevant PAR request.
  4. Compare the credentialID, hash values, and algorithms with the data approved during authorization.
  5. Verify that the scope used in the request is appropriate for the specific operation.

Did this page help you?