Product quickstart
Get to your first community post in a few steps.
1. Register a business account
All API access is gated behind a business account. Register, verify your email, then log in to obtain a JWT:
await api.register({ body: { businessName: 'My App', email: 'you@example.com', password: '...' } });
// confirm verification email
const { data } = await api.login({ body: { email: 'you@example.com', password: '...' } });2. Create an API key
Use the JWT to create an API key — this is what you'll use for day-to-day requests:
configureApi({ baseUrl: 'https://api.coin-communities.xyz', auth: jwt });
const { data } = await api.createApiKey({ body: { name: 'production' } });
// data.key is shown only once — store it immediately3. Configure the SDK
configureApi({
baseUrl: 'https://api.coin-communities.xyz',
headers: { 'x-api-key': apiKey },
});4. Sign in a user via Twitter
End-users authenticate with Twitter OAuth:
// Get the OAuth redirect URL
const { data } = await api.twitterAuthUrl({ query: { redirectUrl: 'https://your-app.com/callback' } });
// Redirect user to data.authUrl
// On callback, exchange the code:
const { data: session } = await api.twitterChallengeExchange({
body: { challengeCode: params.get('challengeCode') },
});
// session.accessToken is the user's bearer token5. Post a message
The posting wallet must be linked to the user's account first:
// Link a Solana wallet
const { data: challenge } = await api.walletChallenge({
body: { address: 'YourWalletPubkey', chainType: 'svm' },
});
// sign challenge.message with the wallet, then:
await api.linkWallet({
body: { address: 'YourWalletPubkey', chainType: 'svm', signature: walletSig },
});
// Post
await api.postMessage({
path: { token_address: '7eYw...mintAddr' },
body: { content: 'gm', chainId: 'solana', walletAddress: 'YourWalletPubkey' },
});