Skip to content

Authentication

Every public API call carries one credential in the Authorization header. There are two kinds, and they are presented identically.

  1. Open Sharek and go to Settings.

  2. Open the Developers section.

  3. Find the API Key card. The key is masked; Reveal shows it and Copy puts it on your clipboard.

The key belongs to the organization, not to you personally. Anyone calling with it acts as the whole organization.

Put the raw key in the Authorization header. There is no Bearer prefix:

Terminal window
curl -H "Authorization: your-api-key" \
https://dash.sharek.app/api/public/v1/is-connected

A working key answers:

{ "connected": true }

That call is check your credentials, the quickest way to confirm that your key works. To see who it acts for, get the current account.

If you are building a product that schedules on behalf of other Sharek accounts, do not ask them for their API key. Register an OAuth app instead and exchange the authorization code for an access token. Those tokens are prefixed pos_ and go in the same header:

Terminal window
curl -H "Authorization: pos_your_oauth_token" \
https://dash.sharek.app/api/public/v1/integrations

An OAuth token reaches exactly the same operations as an API key. Full flow on OAuth apps.

All four are HTTP 401 with a msg body. The message tells you which stage rejected you:

Response Meaning
{"msg": "No API Key found"} No Authorization header at all.
{"msg": "Invalid API key"} A header was sent, but no organization has that key. Check for a stray Bearer , whitespace, or a rotated key.
{"msg": "Invalid OAuth token"} The value started with pos_ but does not match a live token. It may have been revoked, or its app deleted.
{"msg": "No subscription found"} The credential is valid, but the organization has no active subscription for API access.

The API Key card has a Rotate Key button. Rotating takes effect immediately: the old key stops working the moment the new one is issued.

Everything holding the old key breaks at once, so update them in the same sitting: scripts and scheduled jobs, the CLI (SHAREK_API_KEY or a fresh sharek auth:login), any MCP client configuration, and your n8n credential.

Rotating an API key does not affect pos_ OAuth tokens. Those are revoked under Settings → Apps → Approved Apps instead.

Every example on this site uses obviously fake credentials: your-api-key for API keys and pos_your_oauth_token for OAuth tokens. Substitute your own when you run them, and keep the real values out of anything you share.