BambooHR OAuth callback of a directory source
GET /v1/directory_sources/oauth/bamboohr/callback: BambooHR OAuth callback of a directory source.
GET /
The redirect URI registered on the OhAuthCat BambooHR apps. Consumes the state (single use, 30 minutes, bound to one environment and directory), exchanges the code on the company’s BambooHR domain with the client secret, stores the tokens sealed, checks that the grant carries offline_access and that the employee list can be read, then saves the source (scheduling a sync). Redirects to the start request’s return_url with ohauthcat_oauth (connected or error), directory_id and, on error, error_code (directory_source_scope_missing names a scope the app lacks). An expired, unused state (kept 24 hours past expiry) redirects to return_url with ohauthcat_oauth=error and error_code=directory_source_oauth_expired, and is used up by it. An unknown or already used state answers directory_source_oauth_state_invalid (400) without redirecting: an HTML page for a browser, JSON otherwise.
- Scope
public- Auth
- None
- Since
- 1.0
Query parameters
Section titled “Query parameters”
Absent when BambooHR reports an error.codestringmax length 2048
statestringmax length 256
BambooHR’s error (RFC 6749 §4.1.2.1), e.g.errorstringaccess_denied.max length 256
Headers
Section titled “Headers”
Minor version; defaults to the environment’s pin.OhAuthCat-Versionstring
Responses
Section titled “Responses”- 302 Redirect to the start request’s return_url.
- 400
<a href="/: the state is unknown, already used or malformed. A browser (Accept text/html) gets a short self-contained HTML page ("This link can’t be used") naming only the request ID; API clients get the JSON error. Errorerrors/ directory_source_oauth_state_invalid/ "> directory_source_oauth_state_invalid</ a> - 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
Errors share one shape; see the error code catalogue.
curl -X GET \ "https://api.ohauthcat.com/v1/directory_sources/oauth/bamboohr/callback"const response = await fetch("https://api.ohauthcat.com/v1/directory_sources/oauth/bamboohr/callback", { method: "GET",});const data = await response.json();import osimport requests
response = requests.get( "https://api.ohauthcat.com/v1/directory_sources/oauth/bamboohr/callback",)data = response.json()