Intervals.icu OAuth support

Thanks for your response, I’ll update my app accordingly then

1 Like

It is as app4g says. I am planning to support multiple access tokens per app soon. That was an oversight on my part.

Coming back to this, is multi access token already supported?

Thanks!

I just implemented that. There can be many access tokens for an athlete linked to an app, once for each time they authorise it. The most recent scopes apply to all access tokens.

3 Likes

Thanks! One more question, is there also a scope for managing my athletes? The use case it’s that coaches will be connecting to intervals.

EDIT: Found it in Swagger, there is a ATHLETES scope, but still doesn’t seem to work.

EDIT2: It seems accessing /athletes seems to work with my own API key but not through the bearer token where I get 403.

Currently oauth tokens grant access to the authorising athlete’s data but not to people they follow or coach. This is by design so someone who follows you can’t auth a 3rd party app which then gains access to your data. I think you need to get each athlete to auth your app and then use the correct token depending on the athlete.

Will this work?

The only (specific) issue to us, it’s that we work with coaches and use there data. Unfortunatly our whole data platform is built around the idea of 1 connection → multiple athletes. This was following the same logic as TrainingPeaks basically, where the coached athletes are also available through the API.

Is there a way to have intervals.icu push new activities for a user to an application?
Alternatively, I could regularly poll the API for new activities. Is there a rate limit in place that would limit this solution?

The rate limiting question is also relevant for the backfill scenario (where users first authorize the application and where the applications needs to process historical activities). Are there any limitations on doing that?

There are are rate limits but they are very generous and you aren’t likely to get a 429. They are there mostly to protect the server app from bugs in the Intervals.icu client :slight_smile: So backfill shouldn’t be a problem.

There is some undocumented support for webhooks. If you send me one or two web hook URLs (e.g. one dev one prod). I will set that up for you.

Thanks for the reply. I’ll reach out to you as soon as I’m ready for integration!

1 Like