Top

Get the Id (or the whole contact object) of the current log on user

Answered

Comments

7 comments

  • Andrea MARIN

    Hi,

     

    here you can find a solution https://hub.openrainbow.com/#/documentation/doc/node/tutorials/Managing_contacts 

    0
    Comment actions Permalink
  • Olivier ANGUENOT

    Hi Nathanael,

    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 ?

    Thanks

     

     

    1
    Comment actions Permalink
  • Nathanaël Jouët

    Sorry, I ommit to mention that I'm using the SDK for web.

    rainbowSDK.contacts.getConnectedUser() is exactly what I was looking for.

    Thanks Andrea and Olivier.

     

    0
    Comment actions Permalink
  • Patrice COHAUT

    Side question : when using rinbowSDK.contacts.getAll(), on the web SDK, we need to wait for Rainbow to load everything in memory. Do we have an event attached to that which says "all loaded" so that we can use this method ? Thanks 

     

    0
    Comment actions Permalink
  • Pascal BORSCHNECK

    Hi Patrice,

    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
    RAINBOW_ONCONTACTINFORMATIONCHANGED
    is fired if a contact is updated and for new contacts.

    Best regards,
    Pascal

    0
    Comment actions Permalink
  • Patrice COHAUT

    when using rainbowSDK.contacts.getConnectedUser() ; how to get the avatarimage URL and also how to change these user settings parameters (my name, ...) Thanks 

     

    0
    Comment actions Permalink
  • Pascal BORSCHNECK

    Not (yet) documented, if it exists it is in contact.avatar

    0
    Comment actions Permalink

Please sign in to leave a comment.

Still can't find what you need?

  • Contact Us

    Do you have any question about Rainbow? Leave us a message to get more information.

    Contact
  • Ask the Community

    Do you need help? Ask your questions to the Community and get answers from other Rainbow users.

    Post message