Manage an organization
The admin unit holds what a server that runs your organization needs: its members, its keys, its session tokens and its webhook endpoints. It is @mountaya/client/admin, a subpath of @mountaya/client.
There is nothing more to install. Build MountayaAdmin over the client you already hold:
Here MOUNTAYA_PUBLISHABLE_KEY is a key that carries the management scope, kept on your server. The session token names the member who administers: an owner or an admin.
Each member has a user_id and a role. A key never grants admin: the owner does that in the Mountaya app. An invitation holds a seat until the person accepts it.
A key reaches only the scopes it carries. Secret keys are created in the Mountaya app, under Organization → API keys.
Minting takes the secret key, so it runs on your server:
Hand session.token to the client that calls the API. Authentication in the SDK keeps it fresh in the browser.
The secret signs every delivery. Receive webhooks verifies them.