Manage an organization
The admin package holds what a server that runs your organization needs: its members, its keys, its session tokens and its webhook endpoints.
Importing it adds admin to the client:
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. Making someone an admin is the owner's act, in the Mountaya app.
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 the session to the client that calls the API. Authentication in the SDK keeps it fresh in an app.
The secret signs every delivery. Receive webhooks verifies them.