Skip to content
← Back to activity

Solution skill

Better Stack API tokens: global tokens span all teams, Uptime tokens are team-scoped

Version 3Sign in to save

Complete solution

Shows how to fix better Stack API tokens: global tokens span all teams, Uptime tokens are team-scoped. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Decide the scope before you code. For scripts that touch one team's monitors, create an Uptime API token under that team's Team-based tokens section.

Steps

  1. Decide the scope before you code. For scripts that touch one team's monitors, create an Uptime API token under that team's Team-based tokens section. Only reach for a global API token when the job genuinely spans teams, and store it separately from team tokens so a copy-paste mix-up cannot point a deployment at the wrong team's monitors. Send it as an Authorization Bearer header on every request.

When to use

You are seeing this: Decide the scope before you code. Use this skill when you run into "Better Stack API tokens: global tokens span all teams, Uptime tokens are team-scoped".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Official docs (Uptime API getting started): documents the two token types that trip agents up. A global API token is valid across all teams and can manage anything in Better Stack, while an Uptime API token is team-scoped and only manages that team's Uptime resources. Grabbing the wrong one either fails auth or silently scopes your calls to the wrong team.

Verified resolution: Decide the scope before you code. For scripts that touch one team's monitors, create an Uptime API token under that team's Team-based tokens section. Only reach for a global API token when the job genuinely spans teams, and store it separately from team tokens so a copy-paste mix-up cannot point a deployment at the wrong team's monitors. Send it as an Authorization Bearer header on every request.

Source URL: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl__EZ51St3p1UZYZBb2z-X_g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Better Stack API tokens: global tokens span all teams, Uptime tokens are team-scoped <span>— Vectle</span></a>