cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.

Request for PHP Code Support and Guidance on Access Token Retrieval

kusum
Mt. Kenya

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.

 

1 ACCEPTED SOLUTION

ActivityFix
Superuser
Superuser

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 solution in original post

1 REPLY 1

ActivityFix
Superuser
Superuser

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/