application_submit
Submit a join application. A client sends this after authentication fails with application_required, then waits for a reviewer to approve it.
Request
Section titled “Request”{ "cmd": "application_submit", "user_id": "USR:local_alice", "username": "USR:local_alice", "message": "Friend of Bob's, here for the game nights."}| Field | Type | Required | Description |
|---|---|---|---|
user_id |
string | Unless authenticated | The applicant’s user ID. Defaults to the connection’s authenticated user. |
username |
string | Unless authenticated | The applicant’s username. Defaults to the connection’s authenticated user. |
message |
string | No | A note for reviewers, up to 500 characters. Default "". |
A connection that failed the access check has no user attached, so it must send user_id and username.
Response
Section titled “Response”{ "cmd": "application_submit", "application": { "id": "5b1f3c1e-8d0a-4d6e-9f43-2a7c9e1b0d55", "user_id": "USR:local_alice", "username": "USR:local_alice", "message": "Friend of Bob's, here for the game nights.", "status": "pending", "created_at": 1767225600.123, "reviewed_at": null, "reviewed_by": null }, "status": "pending"}See applications for the fields.
- If the user already has a pending application, the server returns that one unchanged. The new
messageis ignored. - A user whose earlier application was rejected gets a new application.
Every authenticated connection whose user has manage_access or review_applications receives an application_new frame with the application and the current pending count. This happens on a repeat submission too.
Permissions
Section titled “Permissions”Anyone can call it, including a connection that hasn’t authenticated. It works in every access mode, not only application.
Errors
Section titled “Errors”val |
When |
|---|---|
Authenticate first, then submit your application |
No user_id or username was sent and the connection isn’t authenticated. |
Application message must be 500 characters or less |
message is too long. |
You are already a member of this server |
The user is a member. |
You are already approved to join this server |
The user is whitelisted or is the server owner. |
Unable to save application |
The server couldn’t save the application. |
An empty user_id or username, or a field of the wrong type, returns the schema validator’s message.
