Automatic Invitations
The automatic invitation mechanism (“auto-invitations” for short) lets you invite a user to a box without having to send this user an invitation link. The box secret key is encrypted with the public key of the user, so that it can be sent through Misakey without compromising end-to-end encryption.
The public key to use for encryption is the “identity public key” of the user (see the reference for identities endpoints about how to retrieve it). For users who don't have an identity public key yet (or don't even have a Misakey account yet), you can create a crypto provision to use as a substitute of the identity public key.
#
Construction of Auto-InvitationsCreate a JSON object with the following shape using the box secret key:
Encode the JSON into bytes, and encrypt the result with the identity public key of the recipient. The available public keys for an identifier can be listed using endpoint “list identities public keys”. The result is the encrypted payload of the auto-invitation.
Auto-invitations are not created through dedicated endpoint, but by passing extra data in some queries instead. Typically, auto-invitations are created when adding accesses to a box, or during box creation for organizations.