Frequently Asked Questions - TrainingPeaks/PartnersAPI GitHub Wiki

How to request access to Partners API?

Please use this form to contact us. We will personally evaluate each requests and we will get back to you as soon as we are able to. At this time, we are not accepting any API requests for personal use.

How to contact TrainingPeaks for support?

Please use this form to contact us, and we will get back to you as soon as we are able to.

How do I get my API credentials to production?

Once you have completed development using our UAT environment, please contact us in this form. We will promote your credentials after validating the data. Please see this page to see what we validate.
In order to point to production system, please refer to our oauth page and endpoint page.

What is the API rate limit?

We don't have a preset hard limit on API usage. But, we do ask that you attempt to minimize any potentially disruptive impact on our systems. If your application has a few hundred users, and you're reading and writing data only as needed, then that will be well within our normal expectations. If you have a much larger user base, or you are performing large batch operations, then please contact us to discuss your expected access patterns.

Why is the data in sandbox different from production?

We refresh sandbox environment weekly over the weekend from production. All modifications made during the week will only be in the environment you are modifying in.

How can I create test account in Sandbox?

Please refer to this wiki section

How can I login to TrainingPeaks in Sandbox?

If you created an account in the sandbox, or if you already have account in production, you can use below link to login to TrainingPeaks in Sandbox environment. TrainingPeaks Login Page

How can I associate my coach account to athletes?

Please refer to this Help page

How can I associate my athlete account to a coach?

Please refer to this Help page

How to get structured workout for the planned workouts?

Getting a structured workout for a planned workout is a 2 steps process.

  1. Get upcoming workout using WOD endpoint. This will give most of the information about the planned workout, except for structured workout. Returning object is based on workout object.  In the response array, you fill find WorkoutFileFormats property. Based on the type of workouts, this will be dynamically generated. Current options for WorkoutFileFormats are fit, erg, mrc, zwo, and json.
  2. Based on the file format, and workout id, call get workout file. This will only contain the structured workout in requested format.

Workout structure overrides planned distance, duration, and TSS

When you POST or PUT a workout with a structure value, we will compute planned distance, duration, and TSS from the sum of the structure steps, if sufficient data is available. These computed values from structure will override the original values in the distance, duration, and TSS fields.

Why is GET call for workouts not returning descriptions field?

For some of the GET calls that return workout object, please add includeDescription=true to the query string of the GET request. Following endpoints have option to include description field

Why is /workouts/details not returning anything?

In order for getting /workouts/details to return, it needs to satisfy following condition.

  • Athlete needs to be premium athlete. Please see Premium vs Basic Athlete. If the athlete is not premium athlete, you will get status code 403.
  • The workouts needs to be completed workouts. If not, you will get status code 204.
  • The workouts needs to have associated workout file uploaded. If not, you will get status code 204. In order to confirm this, open up TrainingPeaks UI, and open up the workout in calendar. If you see "Upload" button, there are no file(s) associated. If you see "Files" button, there are workout file(s) associated with the workout.

Authorizing as a Coach, and getting "App Name is requesting access for an athlete account and you have logged in with a coach account. Please log in with an athlete account to continue."

In order for coach accounts to be able to successfully authorize in Oauth process

  • Your application needs to have coach:athletes scope access granted by TrainingPeaks.
  • In oauth flow, coach:athletes scope needs to be included, and athlete:profile needs to be excluded from scopes requested for authorization.

Authorizing as an Athlete, and getting "App Name is requesting access for a coach account and you have logged in with an athlete account. Please log in with a coach account to continue."

In order for athlete accounts to be able to successfully authorize in Oauth process

  • In oauth flow, coach:athletes scope needs to be excluded from scopes requested for authorization.

While authorizing, getting "Requesting access to both coach and athletes accounts is not allowed at this time. Please contact App Name to resolve this issue."

Please make sure that only athlete:profile or coach:athletes are included in scopes requested for authorization. NOT BOTH.