βΈοΈCommunity Hub API
Our powerful Community Hub API makes it easy to detect, track and auto-verify any in-app or off-chain action.
Last updated
Our powerful Community Hub API makes it easy to detect, track and auto-verify any in-app or off-chain action.
Last updated
You need to pass your API token as a header x-api-key
for all requests.
You can find your API key by signing in to sesamelabs.xyz and then visiting Settings -> In-App Events
API section.
Our product already has integrations with social platforms (like Twitter, Discord, Telegram, Youtube, etc). We also have on-chain integrations (Ethereum, Polygon). However, sometimes you might want to create Quests that incentivize off-chain activity that happens within your product (website, mobile, etc). This is where our events API can be used. Use the below POST endpoint to send events. Once that is hooked up, you can create a Quest, select Action type In-App
and select the event name from the dropdown.
POST
https:/sesamelabs.xyz/api/v0/events
Use this API to send an event that takes place on your website to our servers. This can then be used to create Quests to incentivize user activity within your product.
Our User
type has the following schema. It would either return the wallet address if the user authenticated with the wallet address or will return the discord id and the user name if requested with the discord id.
GET
https://sesamelabs.xyz/api/v0/users/by/wallet/<address>
Fetch a user based on their wallet address.
GET
https://sesamelabs.xyz/api/v0/users/<id>
Fetch user based on id
GET
https://sesamelabs.xyz/api/v0/by/discord/<discordId>
Fetch user based on discord ID.
GET
https://sesamelabs.xyz/api/v0/users/by/external-identity/<external_id>
Fetch user based on external id
GET
https://sesamelabs.xyz/api/v0/users/
Gets a list of users sorted by XP
POST
https://sesamelabs.xyz/api/v0/users/
Create a user with a given wallet address.
POST
https://sesamelabs.xyz/api/v0/users/by/external-identity
Create a user with an external identity, email, and name
POST
https://sesamelabs.xyz/api/v0/users/<id>/reward
Reward users with XP and Credits.
Reward by external user id with XP and Credits
POST
https://sesamelabs.xyz/api/v0/users/by/external-identity/<external_id>/reward
Reward external user id with XP and Credits.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
walletAddress*
String
walletAddress of the user that completed the in-game event
value*
Number
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
String
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. e.g., "battleWon"
address*
String
wallet address
*
String
User ID
discordId*
String
Discord ID of the user
external_id*
String
User ID
walletAddress*
String
Wallet address as string e.g., 0xblahblah
externalId*
String
ID of the user in your DB
fullName*
String
full name of the user
email*
String
email of the user
avatar
String
URL of user's profile picture
*
String
The User ID that want to grant rewards to
xp*
Int
XP
credits*
Int
Credits
eventName*
String
eventName assocated with the reward.
external_id*
String
The ID of the user in your DB that want to grant rewards to
xp*
Int
XP
credits
Int
Credits
eventName*
String
eventName assocated with the reward.
points
Int
Same as Credits. Exactly one out of credits
or points
must be present