Understanding Access Keys
Here’s the converted content using the updated transformation rules:
An access key is your unique authentication key to be used to generate room tokens for accessing the 4Players ODIN server network. Think of it as your individual username and password combination all wrapped up into a single non-comprehendable string of characters, and treat it with the same respect.
All clients that want to join the same ODIN room need to use a token generated from either the same access key or another access key of the same project.
While you can create an unlimited number of access keys for your projects, we strongly recommend that you never put an access key in your client code. Please refer to the Token Server Example to grab some code snippets to help you generate ODIN room tokens in a secure way.
Generating Access Keys
Every access key is a 44-character long Base64 string, which consists of an internal version number, a set of random bytes, and a checksum. We're providing several methods for generating new access keys using our SDKs.
You can create an access key for up to 25 concurrent users for free directly in the widget below.
Click on the button to create an access key that you can use for free for up to 25 concurrent users.
Using the SDK
We're providing several ways to create access keys locally using one of our SDKs. The resulting access keys can be used to access the ODIN network with up to 25 concurrently connected users free of charge.
- JavaScript
- C/C++
If you have an active ODIN subscription, contact us to submit the public key for an existing access key.
With ODIN Command Line Utility
We provide an NPM-based command line utility that you can use to generate an access key. Install it with this command:
Then, you can use the command-line tool in your terminal to generate an access key:
You'll get a response similar to this one. You can use the access key in all SDKs available.
Flowchart
The relationships between the individual components of an access key are as follows:
Terminology
Access Key:
Gives access to the ODIN network. It is a 44-character long Base64 string, which consists of a version, random bytes,
and a checksum.
Secret Key:
Generated from the access key, it is based on the Ed25519 curve and used to sign a room generated by the game developer.
Public Key:
Generated from the access key, it is based on the Ed25519 curve and must be uploaded to 4Players so that a generated
room token can be verified.
Key ID:
A shortened public key, included in the token, making it possible to identify which public key must be used to verify
the room token.
Room Token:
A signed JWT given to the game clients that allows them to connect to a voice chat room in the ODIN network.