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 Error | Meaning | Recommended Action |
|---|---|---|
400 invalid_grantinvalidCodeVerifier | 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_clientinvalidCredentials | 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 request | The access token (Bearer token) is invalid or has expired. | Obtain a new access token intended for the specific operation. |
403 | Insufficient 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/signHash | Invalid 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:
- Verify that the
access_tokenhas not expired. - Verify that the
redirect_uriexactly matches across all OAuth flow steps. - Ensure that the
code_verifiercorresponds to thecode_challengeused in the relevant PAR request. - Compare the
credentialID, hash values, and algorithms with the data approved during authorization. - Verify that the
scopeused in the request is appropriate for the specific operation.
Updated about 2 months ago
Did this page help you?