Product APIs & OAuth
The product APIs — Methacore, ShellBase, useNotification, the Artim Academy LMS and Tag der Ausbildung — use OAuth2 instead of API keys. All access goes through api.artim-industries.com: your client is authorized there, exchanges there and refreshes there. You never touch the product systems directly.
The path to a token
| Step | Where | What happens |
|---|---|---|
| 1 · Authorize | GET /v1/oauth/authorize | Your application's consent screen, then sign-in with the product, then organisation approval. |
| 2 · Exchange | POST /v1/oauth/token | The one-time code is exchanged for a 30-day bearer (mcapi_…, sbapi_…, unapi_…, lmsapi_…, tdaapi_…). |
| 3 · Call | https://<sektion>.api.methacore.de | Each API only answers on its own subdomain. |
| 4 · Refresh | POST /v1/oauth/token | grant_type=refresh_token — always to at most 30 days from now. |
Authorize
PKCE is mandatory: generate a random code_verifier for each authorization, send only its SHA-256 hash as code_challenge and keep the original until the exchange.
GET https://api.artim-industries.com/v1/oauth/authorize
?response_type=code
&client_id={deine client_id}
&redirect_uri={registrierte Redirect-URI}
&scope=mc.members:read mc.members.profile:read
&code_challenge={S256(code_verifier)}
&code_challenge_method=S256
&state={zufällig}
Users first see your consent screen (name, logo, scopes in plain language), then sign in with the product and approve an organisation. For internal applications the organisation is fixed — it is the one chosen when the API was linked, and only its members get through. For external ones, users choose freely among the organisations they manage.
Exchange and refresh
curl -X POST https://api.artim-industries.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"code": "{code}",
"redirect_uri": "{deine Redirect-URI}",
"client_id": "{client_id}",
"client_secret": "{nur vertrauliche Clients}",
"code_verifier": "{das Original}"
}'
The response contains access_token (mcapi_…), expires_in (2592000 seconds = 30 days) and api_base — the subdomain of your API. Refreshing uses the same endpoint:
curl -X POST https://api.artim-industries.com/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{ "grant_type": "refresh_token", "refresh_token": "mcapi_…" }'
Always to at most 30 days from now — a token can be refreshed as often as you like, but never further than 30 days into the future.
What a token is bound to
| Binding | Meaning |
|---|---|
| Account | The product account that authorized. |
| Organisation | Exactly the one approved organisation. |
| Scopes | Your client's scopes — narrower is always possible, wider never. |
| API | Via the subdomain: a token for the members API cannot get past accounting. |
GET https://api.methacore.de/tokeninfo shows at any time what a token is bound to.