Check a connection

Confirm that a key works and see the workspace and member it acts as.

GET/me

Use this to test a key when someone connects your integration. It takes no parameters.

cURL
curl --fail-with-body "$JEMERO_URL/me" \
  -H "Authorization: Bearer $JEMERO_API_KEY"
Node.js
const response = await fetch(`${process.env.JEMERO_URL}/me`, {
  headers: { Authorization: `Bearer ${process.env.JEMERO_API_KEY}` },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());
Python
import os
import requests

response = requests.get(
    f"{os.environ['JEMERO_URL']}/me",
    headers={"Authorization": f"Bearer {os.environ['JEMERO_API_KEY']}"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
Response 200
{
  "workspace": { "slug": "acme", "name": "Acme" },
  "user": { "email": "[email protected]" },
  "role": "owner"
}
FieldMeaning
workspace.slugThe workspace's name in its address.
workspace.nameIts display name.
user.emailThe member who created the key.
roleowner, co_owner or member. A member with a custom role also shows member.

Errors#

StatusCause
401The key is wrong, expired or revoked, its creator left, or it belongs to a different workspace.

See Errors.