Skip to main content
Solved

Request for PHP Code Support and Guidance on Access Token Retrieval

  • August 22, 2024
  • 1 reply
  • 45 views

Forum|alt.badge.img+1

Dear Strava Developer Support Team,
I am currently working on a project that requires integrating with the Strava API using PHP. However, I noticed that your official developer site does not provide PHP-supported code examples.

After searching, I found a PHP repository on GitHub that seems to be aligned with Strava’s API, but it currently has seven unresolved issues.

Additionally, the code requires an "ACCESS TOKEN" to function correctly, but I couldn't find clear documentation on how to generate or retrieve this token specific to PHP implementations.
Could you kindly provide guidance or official PHP code examples for integrating with your API? Furthermore, I would appreciate detailed instructions on how to obtain the necessary access token.

 

Best answer by ActivityFix

I would recommend you look into existing PHP libraries for OAuth and Strava to get some idea of how to integrate with the API. My suggestions would be:

As far as obtaining the token, the OAuth flow is documented at https://developers.strava.com/docs/authentication/ . It is a standard flow so there's nothing specific to Strava about it. If you follow those steps and use the above OAuth library a minimal amount of code is needed to obtain access tokens. League has an example page which should get you started - https://oauth2-client.thephpleague.com/usage/

View original
Did this topic help you find an answer to your question?

1 reply

ActivityFix
Superuser
Forum|alt.badge.img+24
  • Superuser
  • 243 replies
  • Answer
  • August 22, 2024

I would recommend you look into existing PHP libraries for OAuth and Strava to get some idea of how to integrate with the API. My suggestions would be:

As far as obtaining the token, the OAuth flow is documented at https://developers.strava.com/docs/authentication/ . It is a standard flow so there's nothing specific to Strava about it. If you follow those steps and use the above OAuth library a minimal amount of code is needed to obtain access tokens. League has an example page which should get you started - https://oauth2-client.thephpleague.com/usage/


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings