Get token
Creating an authentication token for your user
Generating an Authentication Token
Steps to Generate the Authentication Token:
POST https://api.clinch.gg/v0/wager/operator/create-token{ "userId": "<userId>", "displayName": "<userName>", }x-operator-id: your_operator_id x-api-key: your_api_key{ "status": 200, "data": { "token": "eyJhbGciOiJSUzI1NiIsInR5cC..." } }function async getToken() { const response = await fetch('https://your-server.com/generate-token', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ userId: "user123", displayName: "John Doe", lightningAddress: "[email protected]" }) }); const data = await response.json(); return data.token; }