• Resolved ibarrere

    (@ibarrere)


    Hello,

    I am trying to find event attendees via the REST API. I came upon this thread already, which was not particularly helpful.

    I found the wp-json/tribe/tickets/v1/attendees endpoint, which seems like it should do the trick, but a GET call to it returns nothing:

    {
        "rest_url": "https://wp.myurl.org/wp-json/tribe/tickets/v1/attendees/",
        "total": 0,
        "total_pages": 0,
        "attendees": []
    }

    Even though my page has attendees, which are visible if I navigate to Tickets > Attendees on the lefthand tool bar.

    Any idea why they are not visible through the REST API?

    Thanks,

    Ian

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @ibarrere ,

    Thank you for reaching out.

    For privacy, attendee information are purposely hidden from public calls to the attendees endpoint (wp-json/tribe/tickets/v1/attendees). You will want to authenticate your API call with WordPress for it to work — see Authentication.

    Thread Starter ibarrere

    (@ibarrere)

    Hi Tristan,

    Thanks for the update. I am authenticated though, I am using basic authentication with an application password, and that seems to work as I am able to query other application-specific things like events, tickets, etc.

    Best,

    Ian

    Plugin Support Darian

    (@d0153)

    Hi @ibarrere

    Thanks for your message. Could you try the recommendation provided in our knowledgebase article and see if that works for you?

    I hope this helps. Let me know if you have further questions or concerns.

    Thread Starter ibarrere

    (@ibarrere)

    Hi Darian,

    Not sure if you mean to try using the query parameter listed there? I tried that, and indeed it shows the tickets that purportedly support providing attendee information (most of the tickets I have configured support that, so the query returns 108 ticket types out of the total 112 configured). Likewise, the snippet in the text box below that:

    You may notice in the JSONs returned for tickets that the?attendees?attribute for each ticket shows as an empty array even if you know there are attendees for that ticket. This is because further authentication is required to see that data – we will be adding another Knowledgebase article for how to do that soon.

    applies to me as well, I get an empty array for attendees for all my ticket types, even the ones that apparently support attendee information. I see that the text box says there may be additional authentication required to get that. I am using basic HTTP username/password auth, please advise what sort of authentication I might need for getting attendee information.

    Thanks,

    Ian

    Plugin Support tristan083

    (@tristan083)

    Hi @ibarrere ,

    Thank you for your message.

    May I please know what endpoint you are calling? Does the user you’ve setup for basic authentication have administrator privileges?

    I tested this myself. Using basic authentication with an application password for the administrator user in my testing environment, I was able to retrieve the attendees to one my tickets by calling /wp-json/tribe/tickets/v1/attendees/?ticket_id=<ticketID> in a RESTClient, where the ticketID is the Ticket Post ID.

    Plugin Support Darian

    (@d0153)

    Hi there,

    I hope you’re doing well. I just wanted to touch base and check in with you. It’s been a little while since we’ve heard from you. I was just curious if you had the chance to try out the recommendation provided above.

    Let me know if there’s anything I can assist you with.

    Thread Starter ibarrere

    (@ibarrere)

    Hi Tristan, Darian

    I am trying with the same endpoint that you posted: https://my.site/wp-json/tribe/tickets/v1/attendees?ticket_id=38

    My username has the administrator role, which I think should be sufficient. Apparently I can’t upload images here, but I have a screenshot of my username which says “Role Administrator”.

    Plugin Support tristan083

    (@tristan083)

    Hi @ibarrere ,

    Thank you for your message and the information.

    I am not sure why this isn’t working for you. Perhaps you could try the Cookie Authentication method to isolate the situation?

    Plugin Support Darian

    (@d0153)

    Hi @ibarrere

    I hope you’re doing well. I just wanted to touch base and check in with you. It’s been a little while since we’ve heard from you. I was just curious if you had the chance to try out the recommendation provided above.

    Let me know if there’s anything I can assist you with.

    Plugin Support Darian

    (@d0153)

    Hi there,

    It appears that we haven’t heard back from you in a while, so I’ll assume that the matter has been resolved. If you need any more help, feel free to start a new thread and we’ll be happy to assist you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.