Atmosphere GroupsOpen specificationBeta
MenuClose

fyi.opensocial.requestJoin

Ask to join a group, optionally redeeming an invitation. An invite the group has sent the caller, neither taken back nor past its expiresAt, admits them at once, whatever the group's join policy, with the group's default roles; one named that is not such an invite is refused. Unnamed, a waiting invite is redeemed all the same. No role required; authenticated as the requester.

Kind
A method (procedure)
Record
at://did:plc:2gqnilpksz2e7faj3bwvo6qc/com.atproto.lexicon.schema/fyi.opensocial.requestJoin
In the spec
org.atgrp.requestJoin, the spec's lexicon of the same name. It may differ from this one.

Projects that use this

All projects

main procedure

Input

Encoding: application/json

FieldTypeDescription
group (required)string (did)The group DID. Every method is served by the group's host and authorized against that group's roles.
invitestring (at-uri)An invitation from this group to the caller.
messagestring
  • maxLength: 20000
  • maxGraphemes: 2000

Output

Encoding: application/json

FieldTypeDescription
membershipcom.atproto.repo.strongRefPresent when admitted.
requestfyi.opensocial.defs#joinRequestPresent when pending.
status (required)string
  • knownValues: pending, admitted

Errors

  • GroupNotFound: The group isn't hosted here.
  • InvalidInvite: The invitation is expired, revoked, or not addressed to the caller.
  • JoinClosed: The group requires an invitation.
  • AlreadyMember: The caller is a member already.
The schema as published
{
  "defs": {
    "main": {
      "description": "Ask to join a group, optionally redeeming an invitation. An invite the group has sent the caller, neither taken back nor past its expiresAt, admits them at once, whatever the group's join policy, with the group's default roles; one named that is not such an invite is refused. Unnamed, a waiting invite is redeemed all the same. No role required; authenticated as the requester.",
      "errors": [
        {
          "description": "The group isn't hosted here.",
          "name": "GroupNotFound"
        },
        {
          "description": "The invitation is expired, revoked, or not addressed to the caller.",
          "name": "InvalidInvite"
        },
        {
          "description": "The group requires an invitation.",
          "name": "JoinClosed"
        },
        {
          "description": "The caller is a member already.",
          "name": "AlreadyMember"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "group": {
              "description": "The group DID. Every method is served by the group's host and authorized against that group's roles.",
              "format": "did",
              "type": "string"
            },
            "invite": {
              "description": "An invitation from this group to the caller.",
              "format": "at-uri",
              "type": "string"
            },
            "message": {
              "maxGraphemes": 2000,
              "maxLength": 20000,
              "type": "string"
            }
          },
          "required": [
            "group"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "membership": {
              "description": "Present when admitted.",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "request": {
              "description": "Present when pending.",
              "ref": "fyi.opensocial.defs#joinRequest",
              "type": "ref"
            },
            "status": {
              "knownValues": [
                "pending",
                "admitted"
              ],
              "type": "string"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "fyi.opensocial.requestJoin",
  "lexicon": 1
}

All lexicons