Strava API implemented via node modules

Hey guys,

I am trying to access data from third party, more specifically Strava.com , I am interested in some specific data to implement into my app that is created via wix code. Read data and do some magic in my app :slight_smile: … I have recently requested node module that was added into backend/node_modules - find it under name strava. Version from here was added https://github.com/mcfitz2/node-strava/blob/master/README.md.

My question is simple and very broad in the same time. So far I am here:

import strava from ‘strava’;

next thing should be oAuth, so each user confirms that his/her data is being brought to my app. And here is the point. How to do this in wix code? I am supposed to add something following:
(note that I already have my client ID, client secret and access token. Not sure what redirect URI is but I guess it is https://www.strava.com/oauth/authorize ). If you put all of this combined into code below, I get several errors. Especialy with require part. I ve read somewhere that this is not supported. If so how do I actually bypass this? Any help will be appreciated. Apologies for my terminology and lack of coding skills. Just started recently with javascript and wix code. Thanks guys.

var strava = new require("./strava")({
        client_id: "<Client ID>",	
        client_secret: "<Client Secret>",
        redirect_uri: "<Redirect URI>",
        access_token: "<Access Token>"
    });

Take a look at the Google Sheets NPM example for oAuth and other good stuff.

Hi mate. How did it go with your Strava integration? I need the same thing, can we have a chat on this topic?