Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

321401: Invalid credentials


ERROR: 321401

error-321401 page anchor
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.

Possible causes

possible-causes page anchor
  • The client_id value is incorrect.
  • The client_secret value is incorrect.
  • The client_id and client_secret do 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_id and client_secret values.
  • 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.

Additional resources

additional-resources page anchor