Workspace
Check which workspace, key and rate limit a request runs as.
Check which workspace and key a request runs as. Every route can also return the authentication errors, rate_limited and internal_error.
| Route | Method and path |
|---|---|
| Who am I | GET /v1/me |
Who am I
GET /v1/me
The workspace, key and rate limit behind the key you sent. Call it to check that a key works.
Needs the read scope.
Returns
200 with a Me object in data.
Example request
curl "https://app.betterfans.link/v1/me" \
-H "Authorization: Bearer $BFL_KEY"Example response
{
"data": {
"workspace": {
"id": "c8Vn2QxT5mRw9LpK4yHb7ZsD",
"name": "Rivers Agency"
},
"key": {
"id": "key_5Rt8YpLm2QwN6ZxC4VbH9KjD",
"name": "Reporting script",
"kind": "secret",
"mode": "live",
"scopes": [
"read"
],
"prefix": "bfl_live_7Kx",
"accountIds": null
},
"accounts": 2,
"rateLimit": {
"perSecond": 20,
"burst": 60
}
},
"meta": {
"source": "synced",
"asOf": null,
"requestId": "req_7Hq2LmX9pRt4VbN8cKe3WzYa"
}
}The Me object
What GET /v1/me returns.
| Field | Type | Description |
|---|---|---|
workspace | object | The workspace the key belongs to. |
workspace.id | string | Workspace id. |
workspace.name | string | Workspace name. |
key | object | The key that made this request. |
key.id | string | Key id. |
key.name | string | The name given to the key when it was created. |
key.kind | enum | secret for keys made in the dashboard, oauth for keys an MCP client got through OAuth, dashboard for the dashboard itself. One of secret, dashboard or oauth. |
key.mode | enum | live reads linked accounts, test reads the sandbox creators. One of live or test. |
key.scopes | array of enums | read covers every GET and creating links; write also creates actions. Each one of read or write. |
key.prefix | string | The first 12 characters of the key, safe to show and log. |
key.accountIds | array of strings or null | The accounts the key is limited to. null means every account in the workspace. |
accounts | integer | How many accounts this key can use. |
rateLimit | object | This key's rate limit. |
rateLimit.perSecond | number | Requests per second the limit refills. |
rateLimit.burst | number | The most requests allowed at once. |