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

51104: Twilsock: Token doesn't contain service instance


ERROR: 51104

error-51104 page anchor
ERROR

Twilsock could not authenticate the access token because the token does not include the required service instance information. This usually means the token was generated with missing or incorrect grant data for the Twilio SDK product you are trying to use.

Possible causes

possible-causes page anchor
  • Your application generated an access token without the product-specific grant required by the client SDK.
  • The grant in the token is missing the service instance identifier expected by Twilsock.
  • Your application is using a token created for a different Twilio SDK product or environment.
  • The token payload was modified or encoded incorrectly before it was sent to the client.
  • Generate a new access token on your server and include the correct grant for the SDK product you are using.
  • Verify that the token includes the required service instance information for your Chat, Conversations, Sync, or Notify client configuration.
  • Make sure the client is using a token issued for the same Twilio Account and service configuration as your application.
  • Validate the token structure during development before returning it to the client.
  • If you recently changed your token generation logic, compare the current token payload with a previously working token to confirm the required grant fields are present.

Additional resources

additional-resources page anchor