X - External (User-Side Integration)
Off-Platform Authorization & Claim for X Missions
- This API is used to allocate points to a user upon successful completion of a social mission (e.g., Twitter Like, Retweet, Follow, etc.). Social Profile Claim API documentation for more details.
API Endpoint
POST https://loyalty-api-sandbox.mojito.xyz/{tenant}/user/mission-claim
Path Params:
Name | Type | Description | Required |
---|---|---|---|
tenant | string | Tenant slug (e.g., sample-loyalty) | Yes |
Headers
Header Name | Type | Description |
---|---|---|
x-twitter-auth | string | Base64-encoded JSON containing Twitter credentials for off-platform authorisation |
Base64-encoded payload
{
"access_token": "xxxxtwitteraccesstokenxxxx",
"external_id": "1889988141244698624",
"user_name": "mohan990te9759"
}
⚠️Note:
x-twitter-auth can be used when the user is authenticated with X (Twitter) outside of Mojito’s standard Twitter connection flow. This is useful for platforms with their own OAuth flow or Twitter app environment. You can pass the access token directly, without requiring the user to connect their account via Mojito’s /social/twitter/auth
and /user/connect
APIs.
Request Body
{
"mission_id": "<MISSION_ID>",
"user_reference": "user_<user-reference>"
}
Name | Type | Required | Description | Required |
---|---|---|---|---|
mission_id | uuid | yes | Unique ID of the mission to be claimed | Yes |
user_reference | string | no | Unique user reference (e.g., user_<user-reference> or wallet address) | No |
Updated 4 days ago