Authentication
Use OAuth 2.0 Authorization Code with PKCE through accounts.bedrijfsrooster.nl to connect to the Bedrijfsrooster API. Use the v2 endpoints at https://api.bedrijfsrooster.nl/api/v2 for integrations. Legacy IAM is deprecated; password and client-credentials grants are not supported for external integrations.
1. Create a Connect user
Ask the enduser to set up Bedrijfsrooster Connect and securely store the resulting client_id and client_secret.
2. Configure the redirect URI
Register the application's callback URL as described in the setup guide. Use that exact redirect_uri in both the authorization request and code exchange.
3. Ask the enduser to authorize
Redirect the enduser to the provider's authorization endpoint. They sign in and consent as an owner of the Connect client's company.
| Authorization setting | Value |
|---|---|
| Endpoint | https://accounts.bedrijfsrooster.nl/api/auth/oauth2/authorize |
response_type | code |
client_id | Your Connect client ID |
redirect_uri | Your registered callback URL |
scope | openid offline_access ti_api_usr |
resource | urn:bedrijfsrooster:external |
state | A fresh random value, checked when the user returns |
code_challenge | Base64url-encoded SHA-256 hash of a fresh PKCE verifier |
code_challenge_method | S256 |
URL-encode the parameters. Keep the verifier for the code exchange. The provider returns the user to your callback with code and state; validate state and handle a declined authorization before exchanging the code.
4. Exchange the code and refresh access
Send a form-encoded POST to https://accounts.bedrijfsrooster.nl/api/auth/oauth2/token. Authenticate with HTTP Basic using your client ID and secret (client_secret_basic).
| Request | Form fields |
|---|---|
| Exchange the code | grant_type=authorization_code, code, redirect_uri, code_verifier, resource=urn:bedrijfsrooster:external |
| Refresh access | grant_type=refresh_token, refresh_token, resource=urn:bedrijfsrooster:external |
The code exchange returns an access_token and, with offline_access, a refresh_token. Store the refresh token securely and reuse the access token until its expires_in lifetime ends. Refresh through the same token endpoint, saving any replacement refresh token before the next refresh. If the grant expires or is revoked, repeat authorization.
Call the API with the access token, never an ID token or refresh token:
GET /api/v2/company/configuration HTTP/1.1
Host: api.bedrijfsrooster.nl
Authorization: Bearer <access_token>
Discovery and upcoming access
Standard OAuth 2.0/OIDC clients can discover endpoints, supported parameters, and signing keys through the provider's OAuth metadata or OpenID Connect metadata. The issuer is https://accounts.bedrijfsrooster.nl/api/auth. The API also publishes protected-resource metadata. Provider-wide metadata includes grants for other client types; external integrations use the flow above.
Bots and agents use this same flow today. Dedicated MCP access and permissions are coming in Q1 2027; see MCP Access for Clankers.