Eventbrite API -- Attendees API returned 0 attendees - eventbrite

I was trying to retrieve the list of attendees for an event using the following endpoint, with the correct authorization token:
https://www.eventbriteapi.com/v3/events/110736700452/attendees/
I verified from the web interface that the event does have attendees. However, the response return 0 attendees:
{
"pagination": {
"object_count": 0,
"page_number": 1,
"page_size": 50,
"page_count": 1,
"has_more_items": false
},
"attendees": []
}
I have tried using another eventbrite account, create an event, and call the API (using the corresponding authorization token), and I get the attendees list back.
Any idea what I was missing why the first one would have no attendees returned, when the event at like 50 attendees?

Related

Microsoft Graph API delta uses

How can I retrieve the list of delta users using Microsoft Graph API for which his/her group or event data is changed? Users delta api gives the list of users for which their contact related information is changed but not when his/her skills/events/groups data is changed e.g. if few users add a new skill then in incremental mode which api I can use to get these delta users details?
You cannot get notifications about skills. If you try to call Graph API delta endpoint for users
GET https://graph.microsoft.com/v1.0/users/delta?$select=skills
It will return the error message
Invalid request for delta query: for this entity set, $expand/$select
is not supported for the following properties: skills
For events, Graph API supports only notifications for specific user, not for all users.
GET /me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime}
GET /users/{id}/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime}
For groups, you can call the following endpoint
GET https://graph.microsoft.com/v1.0/groups/delta
The response contains the members#delta property which includes the ids of member objects in the group. If the #odata.type is #microsoft.graph.user then id is the identifier of the user.
"members#delta": [
{
"#odata.type": "#microsoft.graph.user",
"id": "693acd06-2877-4339-8ade-b704261fe7a0"
},
{
"#odata.type": "#microsoft.graph.user",
"id": "49320844-be99-4164-8167-87ff5d047ace"
}
]
Resources:
event: delta
group: delta
user: delta

Fetch events from shared calendar with Office 365 REST API

Loading shared calendar from a user works so far.
However, as soon as you want to load the events, we get the following error message:
ErrorAccessDenied
Access is denied. Check credentials and try again.
The URL looks like this:
https://outlook.office.com/api/v2.0/users/{userName}/calendars/{sharedCalendarId}/calendarView
Query:
{
"query": {
"$select": "Subject,Location,Start,End,IsAllDay,BodyPreview,Extensions",
"$expand": "Extensions($filter=Id eq \"Microsoft.OutlookServices.OpenTypeExtension.custom.string.here\")",
"startDateTime": "2018-07-09T22:00:00.000Z",
"endDateTime": "2018-11-09T23:00:00.000Z"
},
"headers": {
"Prefer": [
"odata.track-changes",
"odata.maxpagesize=200"
]
}
}
The following scopes were set:
"openid",
"profiles",
"offline_access", // for refresh token
"https://outlook.office.com/calendars.readwrite",
"https://outlook.office.com/calendars.read.shared",
"https://outlook.office.com/calendars.readwrite.shared"
The Outlook REST API requests are always performed on behalf of the current user (authenticated user). That's why the endpoint /me/calendars works but users/{userId}/calendars does not. You can not get access to another user's calendar using this API. More information is provided here.
To access the other user's calendar you should switch to Microsoft Graph API. Then you could use the following endpoints:
Using https://graph.microsoft.com/v1.0/
GET /me/calendar/calendarView
GET /users/{id | userPrincipalName}/calendar/calendarView
GET /groups/{id}/calendar/calendarView
Remember to specify permissions for accessing user's calendars.

Event attendee status is not reflected in invite sent to attendees

I am currently experiencing inconsistent behavior when creating a new calendar event via the Graph API.
I am marking an attendee for an event as status: Accepted. When the calendar event is created, I can see this attendee marked as Accepted within Outlook. (see below for sample API request)
However, in the invite that goes out to the attendee (and by extension, the attendee's calendar event), the not status is reflected. The event is awaiting a response.
This creates an inconsistency where, from the perspective of the event organizer, the attendee has "Accepted", but from the perspective of the attendee, the event is pending response.
What is the intended behavior here? Can we expect an update in the future that will make this behavior consistent with the above.
Example API request: To create an event, we're posting to https://graph.microsoft.com/v1.0/me/events with a payload like
{
"subject":"Subject",
"body":{
"contentType":"Text",
"content":"Meeting body"
},
"start":{
"dateTime":"2018-04-13T00:00:00Z",
"timeZone":"UTC"
},
"end":{
"dateTime":"2018-04-13T00:30:00Z",
"timeZone":"UTC"
},
"isAllDay":false,
"location":{
"displayName":null
},
"attendees":[
{
"emailAddress":{
"address":"redacted#gmail.com",
"name":"Test Testington"
},
"type":"required",
"status":{
"response":"accepted"
}
}
]
}
The response status is stored independently in each mailbox/calendar. Each attendee has their own copy of the event. When an update to a meeting is received, the mail server looks up the associated event in the recipient's mailbox using the iCalUId property. Each event in each mailbox is a unique record, only linked by this shared iCalUId.
Everything the recipient knows about an event is provided via the iCal object attached to the meeting invite. There isn't a mechanism to "look up" events on a remote server. So while you're marking the attendee as "Accepted", the remove mailbox has no way of knowing this.

Impossible to get messages details in a list request with Gmail API

I am using a ruby on rails app which connects to the Gmail API. When I make a listrequest to get all the messages of one mailbox, I only get back an idand a threadId property for each message.
I tried to follow Gmail API Doc using the fields parameters to get other properties (title, date...). It doesn't work, whether I use the google-api-client gem in my app, or by doing a direct GET request.
Adding any other parameters to the request ends with a failure. Here is the url that works :
https://www.googleapis.com/gmail/v1/users/me/messages?fields=messages(id,threadId)
Am I forced to make one call per message or using batch requests to get relevant datas ? It seems a little heavy...
You first need to list messages like you've done, and then get each message in a separate request.
Request 1
GET https://www.googleapis.com/gmail/v1/users/me/messages?maxResults=1&access_token={ACCESS_TOKEN}
Response 1
{
"messages": [
{
"id": "15fd9f0fe242f975",
"threadId": "15fd9f0fe242f975"
}
],
"nextPageToken": "11889180580605610074",
"resultSizeEstimate": 2
}
Request 2
GET https://www.googleapis.com/gmail/v1/users/me/messages/15fd9f0fe242f975?access_token={ACCESS_TOKEN}
Response 2
{
"id": "15fd9f0fe242f975",
"threadId": "15fd9f0fe242f975",
"labelIds": [
"IMPORTANT",
"CATEGORY_UPDATES",
"INBOX"
],
"snippet": "Tasks tracked last week...",
"historyId": "966691",
...
}
It's also possible to get the total amount of request down from 1 + n of messages to 2 by using batch requests.

Look a message's text from events api response

I'm using slacks events API and have setup a subscription to the reactions_added event. Now when a reaction is added to a message, slack will send me a post body with all the details of the dispatched event as described here.
The problem I'm having is that I want to get the details, specifically the text of the message that my users have reacted to so I can parse/store etc that specific message. I assumed the message would return with some type of UUID that I could then respond to the callback and get the text, however I'm find it difficult to get the specific message.
The only endpoint I see available is the channels.history, which doesn't seem to give me the granularity I'm looking for.
So the tl;dr is: How do I look up a via slacks API, a messages text sent from the events API? Give the information I have the event_ts, channel and message ts I thought would be enough. I'm using the ruby slack-api gem FWIW.
You can indeed use the method channels.history (https://api.slack.com/methods/channels.history) to retrieve message from a public channel . The reaction_added dispatched event includes the channel ID and timestamp of the original message (in the item) and the combination of channelId + timestamp should be unique.
Be careful that you use the correct timestamp though. You need to use item.ts not event_ts
Full example dispatched event from the docs:
{
"token": "z26uFbvR1xHJEdHE1OQiO6t8",
"team_id": "T061EG9RZ",
"api_app_id": "A0FFV41KK",
"event": {
"type": "reaction_added",
"user": "U061F1EUR",
"item": {
"type": "message",
"channel": "C061EG9SL",
"ts": "1464196127.000002"
},
"reaction": "slightly_smiling_face"
},
"event_ts": "1465244570.336841",
"type": "event_callback",
"authed_users": [
"U061F7AUR"
]}
So calling channels.history with these values set should work:
latest = item.ts value
oldest = item.ts value
inclusive = 1
channel = item.channel value
If you want to get messages from a private channel you need to use groups.history.
https://api.slack.com/methods/channels.history

Resources