cancel
Showing results for 
Search instead for 
Did you mean: 

Can't authenticate first login request

straver123
Mt. Kenya
import requests

def get_strava_profile(access_token😞
headers = {"Authorization": f"Bearer {access_token}"}
 
response = requests.get(url, headers=headers)
 
if response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}")
return None

if __name__ == "__main__":
access_token = "YOURACCESSTOKEN"
profile_data = get_strava_profile(access_token)
 
if profile_data:
print(profile_data)

get_strava_profile('')


How do I get this working? I get a 401 error
1 ACCEPTED SOLUTION

SkippyVasquez
Moderator Moderator
Moderator

Hey Straver123,

Thanks for the post. Are you still experiencing this issue? You can always refer to Strava's authentication doc.

 

Skippy
STRAVA | Developer Hub Team


View solution in original post

1 REPLY 1

SkippyVasquez
Moderator Moderator
Moderator

Hey Straver123,

Thanks for the post. Are you still experiencing this issue? You can always refer to Strava's authentication doc.

 

Skippy
STRAVA | Developer Hub Team