Interface InvitationApi


  • @Path("/_matrix/identity/api/v1")
    @Produces("application/json")
    @Consumes("application/json")
    public interface InvitationApi
    An identity service can store pending invitations to a user's 3pid, which will be retrieved and can be either notified on or look up when the 3pid is associated with a Matrix user ID.
    At a later point, if the owner of that particular 3pid binds it with a Matrix user ID, the identity server will attempt to make an HTTP POST to the Matrix user's homeserver via the /3pid/onbind endpoint. The request MUST be signed with a long-term private key for the identity server.
    • Method Summary

      Modifier and Type Method Description
      void invite​(InvitationRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse response)
      Store pending invitations to a user's 3pid.
    • Method Detail

      • invite

        @POST
        @Path("/store-invite")
        void invite​(InvitationRequest request,
                    @Context
                    javax.ws.rs.core.UriInfo uriInfo,
                    @Context
                    javax.ws.rs.core.HttpHeaders httpHeaders,
                    @Suspended
                    javax.ws.rs.container.AsyncResponse response)
        Store pending invitations to a user's 3pid.
        In addition to the request parameters specified below, an arbitrary number of other parameters may also be specified. These may be used in the invite message generation described below.
        The service will generate a random token and an ephemeral key used for accepting the invite.
        The service also generates a display_name for the inviter, which is a redacted version of address which does not leak the full contents of the address.
        The service records persistently all of the above information.
        It also generates an email containing all of this data, sent to the address parameter, notifying them of the invitation.
        Also, the generated ephemeral public key will be listed as valid on requests to /_matrix/identity/api/v1/pubkey/ephemeral/isvalid.
        Currently, invites may only be issued for 3pids of the email medium.
        Return: InvitationResponse.

        Status code 200: The invitation was stored.

        Status code 400: An error has occured. If the 3pid is already bound to a Matrix user ID, the error code will be M_THREEPID_IN_USE. If the medium is unsupported, the error code will be M_UNRECOGNIZED.

        Parameters:
        request - JSON body request.
        uriInfo - Request information.
        httpHeaders - Http headers.
        response - Asynchronous response.