Claim
Overview
The Claim API provides endpoints related to user XP claims, referral bonuses, and associated statistics within the Ethos network. It also handles the Twitter OAuth flow for linking accounts during the claim process.
Endpoints
Get Claim Statistics for Authenticated User
Description: Retrieves XP claim statistics for the authenticated user.
Authentication Required: Yes (Session Cookie)
Parameters
None
Responses
Success Response
Code: 200 OK
ok
boolean
Success status
data
object
Claim statistics data
data.initialBonus
number
Initial XP bonus awarded for joining
data.totalAmount
number
Total XP claimed so far
data.acceptedReferralBonus
number
XP bonus received from accepting a referral
data.receivedReferralBonus
number
XP bonus received from referring others
data.referrerName
string
Name of the user who referred this user
data.referralCount
number
Number of successful referrals made by this user
data.claimed
boolean
Whether the user has claimed their initial XP bonus
Error Response
Code: 401 Unauthorized
Example
Request
Get Claim Statistics by User
Description: Retrieves XP claim statistics for a specific user.
Authentication Required: No
Parameters
Path Parameters
userkey
string
Yes
The userkey for the user to retrieve stats for (supports profileId, address, or service-based keys)
Responses
Success Response
Code: 200 OK
The response format is identical to the /api/v1/claim/stats
endpoint.
Error Response
The endpoint does not return a 404 error for non-existent users. Instead, it returns a successful response with zero values.
Example
Request
Notes
This endpoint allows viewing claim statistics for any user in the system
It works with multiple userkey formats: profileId, address, or service-based keys (e.g., Twitter)
For users without claim data, the endpoint returns zeros rather than an error
The endpoint retrieves data based on the user's Twitter ID, either directly (if using a Twitter service key) or by looking up the Twitter attestation associated with the provided userkey
Get Accepted Referrals
Description: Retrieves a list of users who have accepted the authenticated user's referrals.
Authentication Required: Yes (Session Cookie)
Parameters
None
Responses
Success Response
Code: 200 OK
Error Response
Code: 401 Unauthorized
Example
Request
Twitter Login (OAuth)
Description: Initiates the Twitter OAuth2 login flow for claiming XP. Redirects the user to Twitter for authentication.
Authentication Required: No
Last updated