API: persistent 403 on /api/v1/athlete/{id} with valid key

Hi! I’m getting a consistent 403 “Access denied” from the API for my own athlete.

• Athlete: i297087
• Key: regenerated multiple times in Developer Settings today
• Auth: using Authorization: Bearer (worked for me before)
• Tried different machines/networks; key is trimmed (no spaces)

Could you please check if my key is correctly bound to athlete 297087 and whether any ACL/auth changes could cause this 403? Thanks!

Authorization bearer AFAIK is only for oAuth if you submitted a request to David for an app that is to be used by public.

Otherwise, it should be the other one. (Can’t remember what. I’m sure someone will either move this topic or prove the correct name)

You said “worked for me using auth bearer”. Somehow I believe you’re mistaken.

Try the other version of auth.

Edit: hang on. You said for your own athlete. So not you? The key you provided is for yourself or your athlete?

@Nik_Om_Cinderella_Ri is right. Bearer Auth won‘t work. The guide is clearly saying to use basic auth and you have to use your own API key obviously:

1 Like

Thanks. I’m using Basic with username API_KEY and my key as the password, numeric athlete id 297087.
Freshly regenerated. Still getting HTTP 403 on:
curl -is -u “API_KEY:” https://intervals.icu/api/v1/athlete/297087

You have missed the i before athlete id in your url (as in your initial post)

https://intervals.icu/api/v1/athlete/i297087

Only early registered athletes have the Strava user id without i.

2 Likes

Include the leading ‘i’ in the athlete id.
https: //intervals.icu/api/v1/athlete/i297087 (remove space!)
with Basic Auth, user API_KEY and your api-key as password will work.

1 Like