---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/321402#article
headline: "321402: Empty client_id"
url: https://www.twilio.com/docs/api/errors/321402
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 321402: Empty client\_id

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when you call the OAuth Token API without a value for `client_id`. The Token API requires `client_id`, `client_secret`, and `grant_type` in an `application/x-www-form-urlencoded` `POST` request body, and `client_id` is the unique identifier of your OAuth app.

### Possible causes

* You omitted `client_id` from the Token API request body.
* You sent `client_id` with an empty value. Twilio returns this condition as "Empty client\_id," and the parameter is required.
* You did not send the request body as `application/x-www-form-urlencoded`, so Twilio could not read the required `client_id` parameter.

### Possible solutions

* Include `client_id` in the form-encoded request body and make sure the parameter name is exactly `client_id`.
* Open your OAuth app in Console and copy the Client ID generated for that app. Twilio creates the Client ID and Client Secret when you create an OAuth app.
* Send a complete token request to the OAuth token endpoint with `client_id`, `client_secret`, and `grant_type=client_credentials`.

#### Additional resources

* [OAuth apps overview](/docs/iam/oauth-apps/overview)
* [OAuth Token API](/docs/iam/oauth-apps/oauth-access-token)
* [Identity and Access Management](/docs/iam)
