Get the Id (or the whole contact object) of the current log on userAnswered
I need to compare the current user with his other contacts. How can I get the id (or the contact object) of the current log on user ?
here you can find a solution https://hub.openrainbow.com/#/documentation/doc/node/tutorials/Managing_contacts
As explained by Andrea, if you are using the SDK for Node.JS, you have access to the connected user information (current user) by checking the nodeSDK.connectedUser property.
Using the SDK for Web, you have an equivalent method rainbowSDK.contacts.getConnectedUser()
Same for the SDK for Android: RainbowSdk.instance().myProfile().getConnectedUser()
Could you precise what kind of SDK you use ?
This API rainbowSDK.contacts.getAll() directly replies all known contacts.
(loaded/asked at SDK start and updated if needed)
It's a synchronous call, no need of an event.
The existing event
is fired if a contact is updated and for new contacts.
Please sign in to leave a comment.