Our company uses the Trello API to add new users to our organization as part of our onboarding process. We add a user by making a PUT
to /1/organizations/orgId/members
, which returns a JSON representation of the new user:
{
"id": "521baf66783e22e12f000040",
"confirmed": false,
"fullName": "Bradley Buda",
"memberType": "ghost",
"username": "bradleybuda4",
"email": "[email protected]",
}
(some fields anonymized / removed)
We want to store ID of this user in our system for bookkeeping purposes (so we can later remove the account when we terminate Bradley). However, when the "ghost"
user actually joins the organization (by clicking the link in the invite email), this user record is replaced by an entirely new one, with a different "id"
:
{
"id": "521bb6b018c2a109450001d7",
"confirmed": true,
"fullName": "Bradley Buda",
"memberType": "normal",
"username": "bradleybuda4"
}
The email address is not returned in the GET /1/organizations/orgId/members
call either, so we can't use that as a primary key. We could use the "username"
to track our Trello users, but if the user accepts the invitation using an existing Trello account (rather than creating a new account) then the username will change as well.
Is there any durable way to track invitation acceptance for API-created users? Right now we have to manually keep track of Trello accounts after the invitation is accepted, and we'd like this process to be fully automated. I looked at the GET /1/organizations/orgId/memberships
API as well, but those IDs (idMembership
) also seem to change when the ghost user goes away. And as far as I can tell there aren't any webhooks that fire when the ghost user disappears.
Your analysis is correct, as far as I can tell. There isn't really a way to track members accepting invitations like you want.
If you're willing to poll the memberships on that organization reasonably frequently (depending on how often you add new employees), then you can correlate each ghost disappearing with the member that appeared at the same time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With