51105: Twilsock: Token doesn't contain identity
ERROR
Twilsock rejected the Access Token because it does not include an identity. Twilio client SDKs that connect through Twilsock require an identity in the token so Twilio can associate the connection with a specific user.
- The Access Token was created without an identity value.
- The identity was added in the wrong place when generating the token.
- Your application generated a token with a missing or empty identity.
- Your token generation logic is using a server-side helper library incorrectly.
- The client is sending an outdated or malformed token that does not include the expected identity claim.
- Generate a new Access Token that includes a valid identity for the user who is connecting.
- Review your server-side token generation code and confirm you set the identity before returning the token to the client.
- If you use a Twilio helper library, follow the Access Token examples for your SDK and verify the identity is present in the final token payload.
- Decode the token during testing and confirm the identity is included before your client uses it.
- If your application refreshes tokens, make sure the refreshed token also includes the same required identity.