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:

NameTypeDescriptionRequired
tenantstringTenant slug (e.g., sample-loyalty)Yes

Headers

Header NameTypeDescription
x-twitter-authstringBase64-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>"
}
NameTypeRequiredDescriptionRequired
mission_iduuidyesUnique ID of the mission to be claimedYes
user_referencestringnoUnique user reference (e.g., user_<user-reference> or wallet address)No