Reputation: 11
I’m facing an issue while trying to access event data through the Eventbrite API. I’ve followed the OAuth authentication process to obtain an access token, but when attempting to retrieve a list of events, I keep getting the error:
{"status_code":404,"error_description":"The user_id you requested does not exist.","error":"NOT_FOUND"}
I created an authorization URL with the following parameters:
https://www.eventbrite.com/oauth/authorize?response_type=code&client_id=FAKE_CLIENT_ID&redirect_uri=http://localhost/callback&scope=event_read.
After this, I received the authorization code FAKE_AUTH_CODE_12345
.
I exchanged the authorization code for an access token using the following curl request:
curl --request POST \
--url 'https://www.eventbrite.com/oauth/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=authorization_code \
--data 'client_id=FAKE_CLIENT_ID' \
--data 'client_secret=FAKE_CLIENT_SECRET_98765' \
--data 'code=FAKE_AUTH_CODE_12345' \
--data 'redirect_uri=http://localhost/callback'
This returned a valid access token: FAKE_ACCESS_TOKEN_ABCDE.
I used the access token to call the /users/me/ endpoint with the following request:
bash Copy code
curl --request GET \
--url 'https://www.eventbriteapi.com/v3/users/me/' \
--header 'Authorization: Bearer FAKE_ACCESS_TOKEN_ABCDE' \
--header 'Accept: application/json'
This returned correct user details, confirming the token works:
{
"emails": [{"email": "[email protected]", "verified": false, "primary": true}],
"id": "FAKE_USER_ID_12345",
"name": "My Organization",
"first_name": "My",
"last_name": "Organization",
"is_public": false,
"image_id": "FAKE_IMAGE_ID_67890"
}
When trying to access the list of events with the following request:
curl --request GET \
--url 'https://www.eventbriteapi.com/v3/users/FAKE_USER_ID_12345/events/' \
--header 'Authorization: Bearer FAKE_ACCESS_TOKEN_ABCDE' \
--header 'Accept: application/json'
I receive the following error:
{
"status_code": 404,
"error_description": "The user_id you requested does not exist.",
"error": "NOT_FOUND"
}
I’ve confirmed that there are 11 public events associated with the account, and the user ID used in the request (FAKE_USER_ID_12345) matches the ID returned by the /me/ endpoint.
I’ve tried refreshing the OAuth token and also doing all this without the &scope in the initial url but the issue persists.
Does anyone know why I’m getting this 404 error, despite having the correct token and user ID? Any help would be appreciated!
I tried contacting their support and they said they don't help with API issues anymore so I'm really stuck. Chatgpt as a dev consult was also useless.
Upvotes: 1
Views: 39