321401: Invalid credentials
ERROR
Twilio could not authenticate the request because the client_id and client_secret you provided are invalid, do not match, or are not authorized for the requested operation.
- The
client_idvalue is incorrect. - The
client_secretvalue is incorrect. - The
client_idandclient_secretdo not belong to the same credential pair. - The client credentials were copied with extra spaces or formatting changes.
- The request is using OAuth client credentials that are not valid for the Twilio account or resource you are trying to access.
- Confirm that you are sending the correct
client_idandclient_secretvalues. - Regenerate the client secret if you no longer have a trusted copy, then update your application with the new value.
- Make sure the credentials are passed exactly as issued, with no extra whitespace or truncation.
- Verify that your application is using the correct credentials for the correct Twilio account and environment.
- If you are using Twilio APIs that support OAuth, review your authentication setup and token exchange flow in Twilio IAM.