Using the endpoint users/me.json in Guide returns an "Anonymous user" object

Return to top
Have more questions? Submit a request

6 Comments

  • Edson Satoshi Kimura

    Laura, I'm triyng to execute this call in document_head.hbs but is not working, return anonymous user.

    I've tried in requests_page.hbs to, and returns the same anonymous user

    Our help center is not working because this.

    1
  • Andrew Dietrich

    Hi Edson,

    I see that you currently have a ticket on this assigned to Paulo. Paulo will follow up with you as soon as he can!

    0
  • Andrei Teianu

    I'm having exactly this issue . Doing an ajax get to https://support.{company_name}.zendesk.com/api/v2/users/me.json results in in an anonymous user, even tough I'm logged in zendesk.

    Doing the same api call to /api/v2/users/me.json results in a 404 Not found. Same API call works fine using the ZAFClient.init() method, but due to some other issues I have with it I'm trying to move my zendesk app to ajax calls. Does anyone have any ideas ?

    return $.ajax({
    url: '/api/v2/users/me.json',
    type: 'GET',
    contentType:'application/json',
    dataType: 'json'
    })

    0
  • Lucas Jean

    Hi Andrei,

    We solve this by using this call:

    async function getUserJsonRP() {
    const result = await $.ajax({
    url: "/api/v2/users/me.json",
    type: 'GET',
    cache: false
    });

    return result;
    }

     

    I hope that helps you :)

    1
  • Sean Pinegar

    I observed this same issue with the Zendesk API and found that I needed to enable authenticating the API. You can find Password Access and Token access toggles at

    Settings > Channels > API > Settings > Password Access / Token Access

    0
  • Brett - Community Manager
    Zendesk Community Team

    Thanks for taking the time to share this with everyone Sean!

    0

Please sign in to leave a comment.

Powered by Zendesk