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

51107: Twilsock: Service can't be used


ERROR: 51107

error-51107 page anchor
ERROR

This error occurs when a client SDK tries to connect with an Access Token that points to a Twilsock-backed service instance that is not usable for that connection. Conversations and Sync tokens must include the correct service-specific grant and the correct service SID for the account that owns the service.

Possible causes

possible-causes page anchor
  • The Access Token references the wrong service instance.
  • The service instance exists but is not available for use.
  • The token was signed with credentials from a different account or subaccount than the one that owns the service instance.
  • For Conversations, the token does not include a ChatGrant with the correct Conversation Service SID.
  • For Sync, the token does not include a SyncGrant with the correct Sync Service SID.
  • Decode the Access Token and verify the grants section includes the correct service-specific grant for your SDK.
  • For Conversations, generate the token with a ChatGrant that uses the correct Conversation Service SID.
  • For Sync, generate the token with a SyncGrant that uses the correct Sync Service SID.
  • Regenerate the token with the correct Account SID, API Key SID, API Secret, and identity.
  • Make sure the service instance belongs to the same Twilio account as the credentials used to create the token.
  • If the service instance is disabled or otherwise unavailable, switch to a valid active service instance.

Additional resources

additional-resources page anchor