Authenticate to the When I Work API and obtain a session token
domain: hr-payroll · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
Steps
Request API access, which requires admin-level access on the When I Work account, to receive a private developer key
POST the developer key together with a When I Work user's username and password to the login endpoint
Read the token off the returned person object
Include the token on subsequent requests via the W-Token or Authorization header (or as a cookie/query-string parameter, per the docs)
Re-authenticate to obtain a new token when the current one expires or is rejected
Known gotchas
The token is tied to a specific When I Work user's credentials, not just the developer key - rotating that user's password invalidates the token
Multiple linked objects (Schedules/Locations, Positions, Sites, Users, Tasks, Tags) all connect through Shifts, so misreading the Shifts model can cascade into every related read
API key/developer key issuance is gated on admin access - a non-admin requester cannot self-serve credentials
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?