Members API
How a frontend's backend learns about membership from the Studio.
The Members API is how a frontend learns about membership beyond what the access token says. Every call comes from the frontend's own backend and carries its frontend key.
| Endpoint | Asks | Needs |
|---|---|---|
POST /api/v1/members/eligibility | Is an applicant, who need not be signed in, an eligible member of my community? | Frontend key, the applicant's IP |
GET /api/v1/members/me | What is the signed-in frontend user's membership, with their member data? | Frontend key and the user's access token; internal frontends only |
Base URL and authentication
The Studio serves the Members API at <studio>/api/v1. Send the frontend key as a bearer token:
Authorization: Bearer ofk_<prefix>_<secret>
The key decides the organisation and the frontend, and with it the community a question is answered for. See Frontend keys.
Server to server only
There is no CORS: a browser cannot call the Members API. Call it from your backend, and pass on to the browser only what your page needs.
The answer never says why
The Members API answers a status, never the reason behind it. An unknown member code and a known one with other facts get the same answer, and so do the many reasons a membership can be not valid. The organisation's Studio users see the reasons in the check log; your frontend does not, so it cannot leak them.
In this section
- Eligibility from a backend: asking about an applicant before or without a sign-in.
- The signed-in member: reading the signed-in user's membership and member data, for example to prefill a form.
- Results, rate limits and errors: every status and error, and the limits behind them.
- The reference: Is an applicant an eligible member? and The signed-in frontend user's membership, generated from the OpenAPI description.