322403: Bad Request
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.
- 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, emptyclient_secret, and invalidgrant_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
POSTand setContent-Typetoapplication/x-www-form-urlencoded. - Include the required form fields exactly as documented:
client_id,client_secret, andgrant_type=client_credentials. - If you are building the request manually, send form-encoded fields such as
--data-urlencodeparameters 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.