Getting the agent's id on the app iframe

3 Comments

  • Luis Silva
    Comment actions Permalink

    I have found this example, but it doesn't find the "currentUser" in the context:

    var client = ZAFClient.init(function(context) {
      var currentUser = context.currentUser;
      console.log('Hi ' + currentUser.name);
    });
    0
  • Luis Silva
    Comment actions Permalink

    Ok, just found that we changed the behavior in v2:

    client.get('currentUser').then(function(currentUser) {
    console.log("CurrentUser:"+JSON.stringify(currentUser));
    });
     
    It works like this.
     
    Thanks,
    Luis
    0
  • Nicole - Community Manager
    Comment actions Permalink

    Glad you got things figured out, Luis.

    Have you checked out our Developer Community? They might have more resources for you as you're working on your app.

    0

Please sign in to leave a comment.

Powered by Zendesk