Sesame API
curl --request POST 'https:/sesamelabs.xyz/api/v0/events' \\
--header 'x-api-key: <api-key-copy-from-settings' \\
--header 'Content-Type: application/json' \\
--data '{
"walletAddress": "0x8abDecab4ad7Fc00C599631B662eC103a2F559a4",
"value": 1,
"event": "battleWon"
}'
- walletAddress: walletAddress of the user that completed the in-game event
- value: number of events completed by the wallet. In most cases it is best to use 1. However if you need to batch multiple completions of the same event, then this value can be something other than 1.
- event: The name of the event. It would be great to keep the format of the events consistent. E.g. camel casing, active/passive voice etc.
- x-api-key: This should be passed-in in the header of the API call. This can be fetched from settings page on sesamelabs.xyz
Success
{
"success":true,
"id":"cl9n8v8io00009k0rtjzwsofm",
"appId":"cl6gosk7700368gbh4h1xwvcz",
"walletAddress":"0x8abDecab4ad7Fc00C599631B662eC103a2F559a4",
"timestamp":"2022-10-24T20:41:43.391Z",
"eventName":"battleWon",
"value":1,
}
Failure
{
"success":false,
}
Last modified 1mo ago