Welcome to Snag! This guide will walk you through the initial setup process to get your API key and start integrating loyalty rules into your application.

Sign Up and Access

1

Create your account

Visit Snag Solutions and sign up for an account.
2

Access the Admin Dashboard

Once your account is verified, you can access the admin dashboard at admin.snagsolutions.io.
The admin dashboard is where you’ll manage your loyalty programs, and configure your API keys.
3

Navigate to API Keys

From the admin dashboard, navigate to the API Keys page using the left sidebar navigation.
4

Create your first API key

Click the “Create New API Key” button to generate your first API key.
Copy your API key and store it in a secure location like an environment variable.

Using Your API Key

Your API key is the foundation for all Snag API interactions. Here’s how to use it:

With Snag SDK

import SnagSolutions from '@snagsolutions/sdk'

const client = new SnagSolutions({
  apiKey: 'your-api-key-here',
})

// Now you can use the client to interact with Snag APIs
const users = await client.users.get()

With HTTP Requests

For direct HTTP calls, include your API key in the x-api-key header:
curl -X GET 'https://admin.snagsolutions.io/api/users' \
  -H 'x-api-key: your-api-key-here'
const response = await fetch('https://admin.snagsolutions.io/api/users', {
  headers: {
    'x-api-key': 'your-api-key-here',
    'Content-Type': 'application/json',
  },
})
Keep your API key secure and never expose it in client-side code. Always use environment variables or secure configuration management.

Next Steps

Now that you have your API key, you’re ready to:
  1. Create users - Learn how to add users to your Snag system
  2. Manage user groups - Understand how to handle multiple wallets per user
  3. Connect social accounts - Integrate social media platforms with your users

Create Your First User

Learn how to add users to your Snag system using the metadata endpoint.