---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/51103#article
headline: "51103: Twilsock: Token doesn't contain required grants section"
url: https://www.twilio.com/docs/api/errors/51103
inLanguage: en
dateModified: 2026-06-08T11:38:30.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 51103: Twilsock: Token doesn't contain required grants section

Log Level: ERROR

## Description

You see this error when the Access Token used to authenticate the client does not include a `grants` object in the JWT payload. Twilio Access Tokens must include at least one grant, and the grant must match the Twilio product your client is using.

### Possible causes

* The JWT payload does not include a `grants` object.
* Your backend generated an Access Token without adding any product grant before calling `toJwt()`.
* Your Conversations token was created without a `ChatGrant`. Conversations tokens require a `ChatGrant`, and that grant must include your Conversation Service SID.
* Your Sync token was created without a `SyncGrant`. Sync tokens require a `SyncGrant` with a `serviceSid` for your Sync Service.

### Possible solutions

* Regenerate the token on your server and confirm the JWT payload includes a valid `grants` object before you return it to the client.
* Use a Twilio helper library to create the Access Token instead of assembling the JWT by hand.
* If you are using Conversations, add a `ChatGrant` to the token and include the correct Conversation Service SID and `identity`.
* If you are using Sync, add a `SyncGrant` to the token and include the correct Sync Service SID and `identity`.
* Decode the token and inspect its structure before initializing the client. If you need to verify the JWT format, use a JWT debugger such as jwt.io.

#### Additional resources

* [Access Tokens](/docs/iam/access-tokens)
* [Create Access Tokens for Conversations (classic)](/docs/conversations-classic/create-tokens)
* [Issuing Sync Tokens](/docs/sync/identity-and-access-tokens)
