{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/TokenRequest", "title": "TokenRequest", "type": "object", "properties": { "keyName": { "type": "string", "description": "Name of the key used for the TokenRequest. The keyName comprises of the app ID and key ID on an API Key.", "example": "xVLyHw.LMJZxw" }, "capability": { "type": "object", "description": "The [capabilities](https://www.ably.io/documentation/core-features/authentication#capabilities-explained) (i.e. a set of channel names/namespaces and, for each, a set of operations) which should be a subset of the set of capabilities associated with the key specified in keyName.", "example": { "channel1": [ "publish", "subscribe" ] } }, "clientId": { "type": "string", "description": "The [client ID](https://www.ably.io/documentation/core-features/authentication#identified-clients) to be assosciated with the token. Can be set to * to allow for any client ID to be used." }, "timestamp": { "type": "integer", "description": "Time of creation of the Ably TokenRequest." }, "nonce": { "type": "string", "description": "An unquoted, un-escaped random string of at least 16 characters. Used to ensure the Ably TokenRequest cannot be reused." } }, "required": [ "keyName", "capability", "timestamp", "nonce" ] }