API V2
Authentication
6 min
all endpoints in the gameye session api require authentication this guide explains how to properly authenticate your requests bearer token authentication the gameye session api uses bearer token authentication, which means you need to include an api token in the header of every request how to use your token add your token to the authorization header in this format authorization bearer your token here example get /session http/1 1 host api gameye io authorization bearer eyjhbgcioijiuzi1niisinr5cci6ikpxvcj9 obtaining a token to get an api token contact gameye to set up an account request an api token for your account store your token securely treat it like a password! token security here are some best practices for keeping your token secure never share your token in public repositories or client side code use environment variables to store your token in your applications consider rotating your token periodically use the sandbox environment for testing authentication errors if authentication fails, you'll receive a 401 unauthorized response with details about the error common reasons for authentication failure include missing token invalid token format expired token token doesn't have permission for the requested resource example error response { "statuscode" 401, "code" "unauthorized", "message" "authentication failed", "details" "invalid bearer token", "path" "/session", "identifier" "abc123", "timestamp" "2023 04 01t12 00 00z" } next steps once you've set up authentication, you can create your first game session check available locations for hosting your game

