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

322403: Bad Request


ERROR: 322403

error-322403 page anchor
ERROR

Twilio returns this error when the OAuth Token API receives a malformed token generation request and cannot issue an access token. Send a POST request to the OAuth token endpoint with an application/x-www-form-urlencoded body that includes client_id, client_secret, and grant_type=client_credentials.

Possible causes

possible-causes page anchor
  • The request body was sent in a format the token endpoint does not accept. The OAuth Token API requires application/x-www-form-urlencoded, and unsupported content types can cause request errors.
  • The payload was malformed, so Twilio could not process the token generation request. This error usually points to the overall request format or structure. Twilio surfaces separate errors for invalid credentials, empty client_id, empty client_secret, and invalid grant_type.
  • The required form fields were not sent using the documented parameter names and values expected by the token endpoint.
  • Rebuild the request to match the OAuth Token API requirements. Use POST and set Content-Type to application/x-www-form-urlencoded.
  • Include the required form fields exactly as documented: client_id, client_secret, and grant_type=client_credentials.
  • If you are building the request manually, send form-encoded fields such as --data-urlencode parameters instead of a JSON body.
  • Verify that you are using the Client ID and Client Secret from a Twilio OAuth app, then retry the request after correcting the payload format.

Additional resources

additional-resources page anchor