CallBack URL

84 views
Skip to first unread message

Christian W

unread,
Dec 8, 2022, 3:50:57 AM12/8/22
to Strava API
Hi all,

wanted to explore the API to build some application with ASP.Net. I´m currently struggeling with the authentication with postman, just for some testing.


The thing is, I always have to get the URL response and extract the code which is inconvenient. How do I get the code automatically.

The other thing with postman. How do I set the callback URL correctly? If I use localhost, I get a Bad Request with callbackURL invalid. If i set this to the suggestion of myapp://myapp.com it will give me a strava promt, why? Can´t this be also automated?

Jan M.

unread,
Dec 9, 2022, 12:18:28 PM12/9/22
to Strava API
That can't and shouldn't be automated because these calls are for the users of your app and not for yourself. They have to confirm which scopes they want to allow for your app.

Christian W

unread,
Dec 14, 2022, 5:23:24 AM12/14/22
to Strava API
Hi Jan,

indeed - you are right, but i´m just thinking on how the app can than work? Because for my user account, I have granted the permissions that the APP can read certain items from my profile. But each time I´m executing my function, I have to obviosuly get an access token and need the code in the response URL. Even though i have already granted permissions to the app. So I´m just not sure on how I can at least for testing automate this process 

Jan M.

unread,
Dec 16, 2022, 6:41:20 AM12/16/22
to Strava API
You have to copy the tokens from the fake callback URL manually only the one time. Afterwards you are using the refresh token and client secret to get the new access token automatically in case the access token was expired.
Reply all
Reply to author
Forward
0 new messages