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
- Open
API documentationfor your configuration and copy the host printed in theBase URLpre block—this is the literal origin you must prepend to the paths below. - Build a
POSTrequest to<base>/api/event/detail-sharing/v1/oauth2/token>withContent-Type: application/json**or**application/x-www-form-urlencoded. - Send JSON (or form fields) containing
grant_type=client_credentials,client_id(shown near the top of the docs), andclient_secret(minted on theCredentialspage). - Parse the JSON response for
access_tokenandexpires_in(tokens last roughly one hour—plan refresh logic accordingly). - Attach
Authorization: Bearer <access_token>to subsequentGETcalls on/api/event/detail-sharing/v1/registrationsor.csv.
Check the result
curl(or your client) prints a JSON body withtoken_typeBearer.- You can immediately reuse the token against the registrations export and receive
200with 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 URLmatches 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"}'