Top

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

Respondida

Comentarios

7 comentarios

  • Andrea MARIN

    Hi,

     

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

    0
    Acciones de comentarios 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
    Acciones de comentarios 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
    Acciones de comentarios 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
    Acciones de comentarios 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
    Acciones de comentarios 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
    Acciones de comentarios Permalink
  • Pascal BORSCHNECK

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

    0
    Acciones de comentarios Permalink

Iniciar sesión para dejar un comentario.

  • Pregunte a la Comunidad

    ¿Necesitas ayuda? Haz tus preguntas en la Comunidad para obtener respuestas de otros usuarios de Rainbow.

    Enviar un mensaje.