Every request needs a header named X-Secret-Server-Token.
This header needs to be fulfilled with your SECRET KEY retrieved previously.
CURL example (POST /players):
curl -XPOST -H 'X-Secret-Server-Token: SECRET_TOKEN' -H "Content-type: application/json" 'http://ENDPOINT_URL/players'
Important note
Your game server is the only one to be able to connect to our WebSocket service.
Our WebSocket service checks whether the IPv4 of the connection is identical to the IPv4 you provided when creating the server. If they do not match the connection will fail.
With Socket.IO, we need to specify a custom path. By default, the path is /socket.io/ but we modified to /servers/.
You also need to provide the SECRET TOKEN. With a Socket.IO library, you can send credentials like this:
const socket = io("ENDPOINT_URL", {
path: '/servers/',
auth: {
token: "SECRET TOKEN"
}
});
Here is the link of their documentation: Sending credentials (socket.io)
Let's start with profiles
Powered by Doctave