đź“„ How to use the API to authenticate

How to use the API to authenticate

Use this article when you need to request a bearer token from the detail-sharing OAuth endpoint documented in the portal.

Before you start

  • Open Event registration sharing while signed in to your Climb account.
  • Install `curl`, Postman, or equivalent on the workstation you use for integration testing.
  • Have a valid client secret already copied into your secret manager.

Who can do this

Requires Administrate Organization to read the docs/credentials UI; the public API itself enforces auth per handler.

Steps

  1. Open API documentation for your configuration and copy the host printed in the Base URL pre block—this is the literal origin you must prepend to the paths below.
  2. Build a POST request to <base>/api/event/detail-sharing/v1/oauth2/token> with Content-Type: application/json **or** application/x-www-form-urlencoded.
  3. Send JSON (or form fields) containing grant_type=client_credentials, client_id (shown near the top of the docs), and client_secret (minted on the Credentials page).
  4. Parse the JSON response for access_token and expires_in (tokens last roughly one hour—plan refresh logic accordingly).
  5. Attach Authorization: Bearer <access_token> to subsequent GET calls on /api/event/detail-sharing/v1/registrations or .csv.

Check the result

  • curl (or your client) prints a JSON body with token_type Bearer.
  • You can immediately reuse the token against the registrations export and receive 200 with a JSON payload.

If something does not work

  • If you receive 400 invalid_grant, the secret does not match the hashed value—rotate again and update your automation.
  • If HTTPS MITM proxies rewrite hosts, verify the Base URL matches what your integration calls; path typos such as /api/event-registration-sharing/... will 404.

Notes

Working curl (replace BASE, CLIENT_ID, CLIENT_SECRET):

curl -sS -X POST "BASE/api/event/detail-sharing/v1/oauth2/token" \
  -H "Content-Type: application/json" \
  -d '{"grant_type":"client_credentials","client_id":"CLIENT_ID","client_secret":"CLIENT_SECRET"}'