API
Accounts & progress
Link identities and retrieve activity, points and campaign progress.
API & SDK
Connect accounts, product activity and campaign progress to the experience you already have. Use the API on your server, the SDK in your frontend and webhooks between systems.
Your organization API token stays on your server
Integration examples
Link an account, open a quest, or register a webhook. Each example identifies where the code runs and links to the full reference.
REST API - server-side
Request a user token from your backend for an authenticated account. Pass that user's token to the Widget, never the organization API token.
Server-side pattern with placeholder account values. Authorize the signed-in user before choosing the account identifier. Treat the response token as sensitive.
User-token guide// Run on your server, not in the browser
const apiToken = process.env.CLAIMR_API_TOKEN;
if (!apiToken) throw new Error("Missing API token");
const url = new URL("https://prod.claimr.io/api/v1/token");
url.searchParams.set("account", "YOUR_ACCOUNT_ID");
url.searchParams.set("platform", "YOUR_PLATFORM");
const response = await fetch(url, {
headers: { Authorization: `Bearer ${apiToken}` },
cache: "no-store",
});
if (!response.ok) throw new Error(`Claimr: ${response.status}`);
const result = await response.json();
// Handle the documented response on your backendExample only - this page does not execute the code
What you can connect
Use REST API calls for backend operations and the Widget SDK for supported browser interactions. Webhooks bring campaign events back to your server.
API
Link identities and retrieve activity, points and campaign progress.
API
Send custom activity and task values that your campaign is configured to recognize.
API
Work with referral relationships, invite codes and XP operations.
SDK
Open quests, manage supported sign-in flows and respond to Widget callbacks.
User identity
Your backend authenticates the account. It keeps the organization credential private and passes only the intended user's token to their Widget.
On your server
Authorizes private API requests. Keep it in your backend environment and out of browser code, examples, and logs.
For one user
Connects the signed-in account to Claimr. Return it only to the user your backend has authenticated.
Before launch, test account switching, repeated events, and webhook verification. Frontend completion is only for tasks configured to accept it.
Customer story · Testnet to builders
For one EVM testnet, Claimr’s custom task integration recorded faucet activity and weekly streaks alongside developer quests and submitted work. Completion methods stayed specific to each task.
Read the case studyAnonymous EVM testnet · 2024 program · Full exported cohort
Repeat-inclusive completion events from the custom on-chain faucet check, across about 47,000 accounts.
How it’s measured for faucet task completionsAccounts completing the weekly streak task, configured to require seven consecutive daily claims.
How it’s measured for qualified for the weekly faucet streakNo. Use the REST API for backend operations without adding the Widget SDK. Add the SDK when the frontend needs supported Widget methods or callbacks.
Yes. You can use the Widget for the customer-facing experience and server-side API calls for connected data and operations. Plan account linking so both refer to the same user.
The organization API token authorizes backend requests and must remain private. A user token links a particular account to Claimr and is passed to that user's Widget. Your backend should authenticate the user before requesting or returning their token.
No. The SDK's complete_task method is documented for tasks configured as Front End type. Do not use a browser-only signal as proof of a backend action that needs independent verification.
Follow the linked API reference for endpoint requirements, parameters and responses, and the SDK guide for client methods. The examples here are starting patterns with placeholder identifiers.
Configure a receiving server endpoint and register the event scopes you need. Review campaign scope, signature verification and duplicate handling before connecting production workflows.
Start with account linking and one product event. Use the documentation for exact requests, responses, and SDK methods.