Consuming Strava API With Xamarin.Forms | by Márcio Júnior | Feb, 2022

A information on find out how to authenticate, obtain and add actions between Strava API and a Xamarin.Varieties cell app

Picture by Jay Miller on Unsplash
string authURL = 
"https://www.strava.com/api/v3/oauth/authorize" +
"?client_id=ReplaceWithClientID" +
"&redirect_uri=myapp://myapp.com" +
"&response_type=code" +
"&approval_prompt=auto" +
"&scope=exercise:read_all,exercise:write";
WebAuthenticatorResult authResult =
await WebAuthenticator.AuthenticateAsync(
new Uri(authURL),
new Uri("myapp://myapp.com"));
curl -X POST https://www.strava.com/api/v3/oauth/token 
-d client_id=ReplaceWithClientID
-d client_secret=ReplaceWithClientSecret
-d code=ReplaceWithCode
-d grant_type=authorization_code
if (tokenExpiresAt > DateTime.Now)
return savedToken;
else
// Ask for a brand new access_token
"/athlete/actions?after=" + stravaSyncDate

"heartrate":
"knowledge": [ 74, 75, 76 ],
"series_type": "time"
,
"time":
"knowledge": [ 0, 5, 10 ],
"series_type": "time"

More Posts