It’s important to remember that the token is exactly the same as giving someone your email and password. They will have access to act on behalf of you, be careful who you share your token to.
Creating an API key allows you to obtain access to the platform without having to login through the Swift Labs web application. The API key can be used to add and modify athlete and squad information and pull athlete activity data as well as additional administration functions.
Creating the Key
Navigating to your organisation settings and clicking on the last tab within the organisation settings will take you to your API keys for your organisation.
Token scopes restrict the amount of functionality the token has with the account. Selecting the athletes:readtoken will prevent the token from being able to create or remove an athlete. This gives you fine grain control over the amount of functionality and access the token has. Using the table below, you should determine the level of access required.
Read coaches for your organisation.
Read the athletes of your organisation.
Create athletes for your organisation.
Update athletes for your organisation.
Remove athletes for your organisation.
Read the squads for your organisation.
Create squads for your organisation.
Update squads for your organisation.
Remove squads for your organisation.
List the athletes that are members of the squad.
List the coaches that are members of the squad
Add coaches to the squad.
Add athletes to the squad.
Remove coaches from the squad.
Remove athletes from the squad.
Read activities of an athlete, acthlete:read also required.
Remove activities of an athlete, athlete:read also required.
Read your organisation details.
Update your organisation details.
Read the users for your organisation.
Update the users for your organisation.
Remove users from your organisation.
Read your user profile.
Update your user profile.
Using your token
Using an application like Postman is an ideal way to test your API key. Appending the token you just generated with the Authorization header, will authorise the requests so long as the token has not expired and has the required scopes.