= Authentication =
To use most API endpoints you will need to include a token header.
'''Step 1: Get an invite code'''
Invite codes can be generated here [https://beds24.com/control3.php?pagetype=apiv2 Invite Codes]
For more information about invite codes, [[API_V2.0#Invite_codes|see here]].
'''Step 2: Get a refresh token using the invite code'''
You can use the invite code generated in step one with GET /authentication/setup.
This will return a ''token'' and a ''refresh token''.
'''Step 3: Use the token to authenticate calls'''
The ''token'' returned in step 2 can be included as a header to authenticate calls to other API endpoints.
Note: ''tokens'' expire after 24 hours.
'''Step 4: Use the refresh token to generate new tokens'''
As ''tokens'' expire after 24 hours, you will need to send the ''refresh token'' to GET /authentication/token to get new tokens.
= Invite codes =