javastrava-api new release

367 views
Skip to first unread message

strav...@gmail.com

unread,
Mar 18, 2015, 1:19:02 AM3/18/15
to strav...@googlegroups.com
Hi all

New release of javastrava-api just out - 0.3.0-ALPHA

We expect that the BETA will release next week


or to use Maven:

<dependency> <groupId>com.github.danshannon</groupId> <artifactId>javastrava-api</artifactId> <version>0.3.0-ALPHA</version> </dependency>

Please do let me know if there are any issues!

Cheers

Dan Shannon

David George

unread,
Mar 26, 2015, 1:55:52 PM3/26/15
to strav...@googlegroups.com
Hi Dan, good work,

I've uploaded some code which does the OAuth side of things for Strava for Java Applications.

https://github.com/davidzof/strava-oauth

This launches a web browser to let the user authenticate and give permissions to the application and includes reading the callback code and includes caching the client token. You basically end up with an authentication token you could use with your library. The code is on github if anyone wants to use it.

Bill Comer

unread,
Sep 12, 2015, 2:38:45 PM9/12/15
to Strava API
Dan,

Hope this is OK posting here.

I am just trying to use your 1.0.0-RC2 release.

Do you know if I am able to connect to starve via an Integration test ?

I have just registered my app with starve specifying localhost for the moment.

I have a test that does something like the following:

Integer clientID = {client-id-from-strava};
String clientSecret = "{client-secret-from-strava}";
String accessToken = "{my-access-token-also-from-same-registration-process}";

Token token= null;
try {
token = service.tokenExchange(clientID, clientSecret, accessToken);
     ......

Buy I am getting the following error.
Any thoughts please ?

javastrava.api.v3.service.exception.BadRequestException: 400 Bad Request : StravaResponse [message=Bad Request, errors=[StravaAPIError [resource=RequestToken, field=code, code=invalid]]]
	at javastrava.api.v3.rest.util.RetrofitErrorHandler.handleError(RetrofitErrorHandler.java:113)
	at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242)
	at com.sun.proxy.$Proxy18.tokenExchange(Unknown Source)
	at javastrava.api.v3.auth.impl.retrofit.AuthorisationServiceImpl.tokenExchange(AuthorisationServiceImpl.java:39)
	



Luis Alfonso González

unread,
Jan 13, 2016, 7:04:30 PM1/13/16
to Strava API
Hello Bill:

Did you succeed in doing this? I have the same problem. My callback domain is "localhost" too. I just want to connect to Strava to get some data and use it offline to create some graphs.

Thank you!

Bill Comer

unread,
Jan 14, 2016, 3:35:15 AM1/14/16
to Luis Alfonso González, Strava API
I did get it working, yes.

When you register the app you just register it as http://localhost:8080/myAppName

--
You received this message because you are subscribed to a topic in the Google Groups "Strava API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/strava-api/dp5XTsbvQXA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to strava-api+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards
Bill Comer

blogs: http://billcomer.blogspot.com/
           http://owtbutwork.blogspot.com/

@beanfactory
M: +44(0)7817794493
W: +44(0)1772 770280

Luis Alfonso González

unread,
Jan 14, 2016, 2:03:36 PM1/14/16
to Strava API, lagonza...@gmail.com

Thanks for your answer Bill. So, something like this?


I'm trying to access thruogh Eclipse while running the program. It doesn't seem to happen anything different. "Bad request" response still pops. I'm pretty sure this has something to do with my lack of knowledge about ports and how client-server things work. Any ideas?
Reply all
Reply to author
Forward
0 new messages