How an athlete can add a coach by API?

Hi David and all,

Going on work and my discovery of the API, I am looking for what endpoints I should use so one athlete can add a coach by API (with the athlete’s oauth token I guess) ?

I think I have to call several endpoints to do (or not) these actions: add as followers, accept the following request from the coach side and/or set the permission of the following association as “coach”.

Thanks

Hmm thats a tricky one because you are editing the athlete and the coach. I could add an endpoint to add a coach to an athlete (using the athlete’s token) that expects the token for the coach as part of the payload. Would also need a matching “isCoachedBy” endpoint to read the same information.

Would that work?

Hi David,

Sorry for the delay, I had a lot of things to do recently.
You wrote the endpoint for an athlete to add a coach would have to use the coach’s token.

For me, every token is private and should be known only by its owner.
I will write in this thread a suggestion of endpoints about how I see the “add a coach” flow when I will be back with more time.

1 Like