This guide explains how to connect your applications to our service.
Before you can use our service, you'll need to get a special access key (we call it a "token"). Think of it like a password that lets your app talk to our service.
Send your email and password to this address: POST /api/auth
{
"email": "you@example.com",
"password": "your_password"
}
curl -X POST https://stokestse.com/api/auth \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your_password"}'
We'll send you your access key and some basic information about your account:
{
"success": true,
"token": "your.access.key",
"user": {
"id": "your_id",
"email": "you@example.com",
"username": "your_name"
}
}
For all subsequent API requests, include your token in the Authorization header as a Bearer token:
Authorization: Bearer your.access.key
Want to see all the organizations you're part of? Just ask: GET /api/orgs
curl https://stokestse.com/api/orgs \
-H "Authorization: Bearer your.access.key"
We'll show you something like this:
{
"success": true,
"organizations": [
{
"id": "org_123",
"name": "My Family Links",
"is_owner": true,
"member_count": 5
}
]
}
If there's a problem, we'll let you know what happened and how to fix it:
{
"success": false,
"message": "Here's what went wrong..."
}
400 - You forgot to include some information we need401 - Your access key is missing or doesn't work anymore403 - You're not allowed to see this information404 - We couldn't find what you were looking for