Users and directories
In order to integrate Weavy into your application must have some sort of user system in place. Weavy will not provide users for you, instead we leverage the existing user system that you already have.
When adding Weavy building blocks to your application you need to ensure your Weavy environment has a corresponding user record for your authenticated user(s).
You can either add users ad-hoc as they access your application or sync them from your application to Weavy ahead of time or on a schedule. Often it is preferred to sync them ahead of time as that will improve the user experience when using @mentions, sending direct messages etc.
Adding users will not count towards your billing calculation, only active users that sends messages, uploads files etc. are counted.
To keep the user record (name, email, profile picture etc) in Weavy in sync with the user data in your application you can use the Web API to add, remove and update users in your Weavy environment. We recommend updating the Weavy user record every time a user is updated in your application, that usually involves syncing users to Weavy from your sign-up function, when a user edits their profile etc.
When adding users to Weavy you should always supply an
uid property. The
uid is a string that uniquely identifies your user, typically your internal user id.
You can then use the
uid when you want to fetch or update the Weavy user, issue access tokens, add a member to an app etc.
Note that the uid cannot contain whitespace and must contain at least one non-digit, for instance, if a user has the integer id
256in your system you can create an
uidby adding a one letter prefix, e.g.
You can separate users in different organizations with user directories. This is useful in multi-tenant scenarios where you want multiple organizations to use the same Weavy environment. Optionally, it also enables communication across organizations, something which is not possible with multiple environments.
- Users can only be members in one directory at a time.
- User within the same directory can always interact with each other.
- By adding users in different directories as members in the same app they can interact with each other regardless of the directory they are in. Users can be part of many apps.