Skip to content
Dashboard
Theme
Theme

BambooHR OAuth callback of a directory source

GET /v1/directory_sources/oauth/bamboohr/callback: BambooHR OAuth callback of a directory source.

View Markdown

GET /v1/directory_sources/oauth/bamboohr/callback

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
  • code string

    Absent when BambooHR reports an error.

    max length 2048

  • state string

    max length 256

  • error string

    BambooHR’s error (RFC 6749 §4.1.2.1), e.g. access_denied.

    max length 256

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • 302 Redirect to the start request’s return_url.
  • 400 <a href="/errors/directory_source_oauth_state_invalid/">directory_source_oauth_state_invalid</a>: 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. Error
  • 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"