cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Strava API Integration in a Google Apps Script Application

ThomasF
Mt. Kenya

Hello,

I am currently working on an integration between Google Sheets, Google Apps Script, and the Strava API. My goal is to create an application where I can authorize access to my Strava data as well as that of my friends, and then retrieve this data in separate Google Sheets. Here are the steps I have followed and the problems encountered:

Creation of the Strava Application: I created an application in the Strava developer space and obtained the necessary keys (Client ID and Client Secret).

Google Apps Script Configuration: I wrote a Google Apps Script to manage OAuth2 authentication with Strava. This script uses the Google Apps Script OAuth2 library and is configured with my Strava Client ID and Client Secret keys. The script is supposed to allow multiple users to authenticate and grant access to their Strava data.

Data Retrieval: The script is supposed to retrieve Strava data (activities, performances, etc.) and insert it into a specific Google Sheets for each user. I have integrated the logic to call the Strava API, retrieve the data, and process it.

Encountered Problems: When I send the authorization link generated by my Google Apps Script to my friends to authorize access to their Strava data, they encounter callback URL errors when they click on the link "the token has expired". But when I do it from a Strava account I created for the test, and I click on the authorization link, this time it works. I feel it works because I am already on the Google workspace, so I wonder if the problem comes from the fact that my friend to whom I send the link is not connected to my sheet?

Request for Help: How can I solve the problem with the callback URL when my friends try to authenticate via the link I send them? Are there recommended practices or specific considerations for managing authentication and data sharing between multiple users in a Google Apps Script application integrating the Strava API?

Any help or suggestion would be greatly appreciated. Thank you in advance for your support.

1 REPLY 1

LongDistance
Mont Blanc

Log completely out of Google then try your own link. I suspect the token is Google’s from your login, and nothing to do with Strava. I suspect it won’t work for you either, if you are logged out of Google.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings