Apps
Change a user's role (from an app, as admin)
For an app's own server code only, on behalf of the signed-in user: fetch(env.HYPAMOON_API + "/app-users", ...) without an Authorization header, forwarding the x-hypamoon-user and x-hypamoon-user-sig headers of the request unchanged. Only forward them: never check the signature in the app code yourself, Hypamoon does. Without them 401; a signed-in user without the app's first role in auth.roles (admin by default) 403. Sets one of the app's roles; the user sees it within seconds. The last user with the first role cannot give it up (409): give someone else that role first.
patch/app-users/{id}
Request
- Base URL: https://api.hypamoon.com/api/v1
- URL: https://api.hypamoon.com/api/v1/app-users/{id}
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: data:write)
Path parameters
idstring uuid required
The id of the user (their sub in x-hypamoon-user).
Request body
Response
The user with the new role.
Changes
No recorded changes to this operation across all 1 revision of this API.