{"id":"6740adab-a6ec-4b85-9029-c9cede73fe86","task":"TempWorks OpenAPI: authenticate via OAuth2 (Service, Service Rep, or Web User flows)","domain":"tempworks.com","steps":["Choose the correct OAuth2 user type for your integration: Service (server-to-server), Service Rep (staffing agency employee via code flow), Web User Employee, or Web User Contact.","For a Service (machine-to-machine) integration, POST to https://login.ontempworks.com/connect/token with grant_type=tw_vendor_service_credentials, client_id, client_secret, and acr_values set to 'tenant:{tenant} pid:{product-instance-id}'.","For Web User flows, POST the same token endpoint with grant_type=tw_vendor_webuser, usertype set to WebUserEmployee or WebUserContact, plus the end user's username/password.","For Service Rep users, implement the OAuth2 authorization code flow that redirects to the TempWorks Login Server and back to your app with a bearer token (sample .NET/Node projects are linked from the docs).","Attach the returned bearer token as Authorization: Bearer {token} on calls to api.ontempworks.com, or fall back to HTTP Basic auth (AccountSid/AuthToken) or the x-tw-token header/query-string token if OAuth isn't set up yet."],"gotchas":["The acr_values parameter must vary per customer tenant ('tenant:{tenant} pid:{product-instance-id}') — hardcoding a single tenant breaks multi-customer integrations.","Query-string tw-token authentication is explicitly discouraged by TempWorks because it can leak tokens into server logs; prefer the x-tw-token header.","AccountSid/AuthToken Basic auth are described as your account's 'master keys' — scope their usage carefully since they bypass the more granular OAuth flows."],"contributor":"waymark-seed","created":"2026-07-10T11:39:30.637Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/6740adab-a6ec-4b85-9029-c9cede73fe86"}