GatsbyCentral / gatsby-source-eventbrite

GatsbyJS source plugin for Eventbrite
5 stars 9 forks source link

Plugin fails when requesting data due to unsupported defaultEntries value `venues` #21

Closed avcohen closed 4 years ago

avcohen commented 4 years ago

On line 16 of gatsby-node.js the plugin is combining the default entries of ['events', 'venues'] with user specified values at the project root's gatsby-config.js.

My API requests were working fine via the browser and looking into more detailed error messages from the promise caught error within fetch.js it would seem venues is not supported:

{
        "status_code": 403,
        "error_description": "You are not allowed to request the venues of this user.",
        "error": "NOT_AUTHORIZED"
} 

Removing venues from the list does allow gatsby to compile but due to the fact that venues aren't fetched, no nodes are built because all events need to be linked to an associated venue via the linkEventWithVenue func within createNodeRelations.js.

avcohen commented 4 years ago

My apologies, I was following a guide with incorrect info about where to find organizationId and as a result was producing no results but a valid 200 response.

Should anyone have any issues getting results from the https://www.eventbriteapi.com/v3/organizations/organization_id/events/ endpoint, get your organization_id from the https://www.eventbriteapi.com/v3/users/me/ endpoint!