odin_token_generator_create_token
Generates a signed JWT, which can be used by an ODIN client to join a room.
This function should not be used in production as the access key will be exposed in the client application. You can use our simple server side token server to generate tokens for your clients. See our guides on access keys and tokens for more information.
Parameters
generator
Handle of the token generator used to create the token. See OdinTokenGenerator
room_id
ID of the room for which the token will be generated. It can be any null-terminated string.
user_id
ID of the user for which the token will be generated. It can be any null-terminated string.
It should not contain personal data (in the definition of GDPR) like an email address. Use a unique identifier for the user. This should be a Steam ID, Discord ID, or any other unique identifier from your authentication system.
out_token
Pointer to a buffer where the generated token will be stored.
out_token_len
Size of the buffer for the token.
Returns
A return code indicating success or failure.