Getting a clientID

269 views
Skip to first unread message

chris fearnley

unread,
Feb 19, 2021, 12:57:51 PM2/19/21
to Strava API
After a lot of searching, I've just found some code suitable for use in my app to deal with the oAuth process, and it's working fine when I use my own client ID. But I'm missing something in the process because I don't understand how to (or why  I need to) get a client ID for other users of my app.
Both the code I am using, and the example code on the Strava site, starts off with needing a client ID. But the code leads to the user being asked to log in to Strava - surely that process provides the API with the required client ID? 
What am I misunderstanding here?

Bryant Likes

unread,
Feb 19, 2021, 1:08:01 PM2/19/21
to chris fearnley, Strava API
The client ID is always the same and it is how Stava knows what client is requesting access for the user. It will show the info you have on your API details page to the user and ask them if they want to authorize your app to access their data. 

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/strava-api/a13bbdf5-2173-4443-ab0c-d20d70e3dfabn%40googlegroups.com.

Scott Tomassetti

unread,
Feb 19, 2021, 1:10:53 PM2/19/21
to Strava API
I would also like to view some sample code on how to handle a button click event for an unauthenticated user and the code for handle the return value and/or clientID that is returned.  

Bryant Likes

unread,
Feb 19, 2021, 1:14:57 PM2/19/21
to Scott Tomassetti, Strava API
There is no client ID returned. The client ID is your id and is only sent in the request. 

Maybe you're thinking of the Athlete ID? 

There is a fair amount of code on the https://developers.strava.com/docs/authentication/ website. 

--
You received this message because you are subscribed to the Google Groups "Strava API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strava-api+...@googlegroups.com.

chris fearnley

unread,
Feb 19, 2021, 2:49:00 PM2/19/21
to Strava API
Bryan. thanks. Yes. I guess I mean the Athelete Id. But the docs are so confusing:  " Android apps can use an Implicit Intent to redirect users....   " then goes on to give sample code which includes the client ID ,but doesn't mention the Athlete ID.
So, maybe my question should be, how do I test my app with an Athlete Id other than my own? I could of course create a new Strava account, but that would only work once, as far as testing the authentication is concerned.

Sakhityan Prakash

unread,
Mar 22, 2023, 8:01:57 AM3/22/23
to Strava API
Hey @chris, I'm in a very similar position to you. I want to create a UI that allows users to authenticate my code to access their activities. Right now since I've only got my client ID and client secret, I can only access my data. I was wondering if you have found a way to get other user's client id and client secret. 
Cheers!

kingo...@gmail.com

unread,
Mar 22, 2023, 9:44:05 AM3/22/23
to Strava API
Hey, I think first thing is to understand how OAuth works. There's a lot of documentation online from various OAuth providers. Your code/app is the "client" in this context. The client_id and client_secret is what allows your code/app to identify with Strava, or whatever OAuth provider you are dealing with. The client_id and client_secret are only loosely associated with your account in so far that you are the "owner" of the app. Regardless of which user is trying to authorize your app, the client_id and client_secret that your app needs to use is always the same. You do not need (and won't get) any other client_id /client_secret other than the one Strava gave you to use with your app. I hope that helps.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages