Skip to main content

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 settingValue
Endpointhttps://accounts.bedrijfsrooster.nl/api/auth/oauth2/authorize
response_typecode
client_idYour Connect client ID
redirect_uriYour registered callback URL
scopeopenid offline_access ti_api_usr
resourceurn:bedrijfsrooster:external
stateA fresh random value, checked when the user returns
code_challengeBase64url-encoded SHA-256 hash of a fresh PKCE verifier
code_challenge_methodS256

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).

RequestForm fields
Exchange the codegrant_type=authorization_code, code, redirect_uri, code_verifier, resource=urn:bedrijfsrooster:external
Refresh accessgrant_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.