Hello everyone:
I'm trying to use javastrava (
https://github.com/danshannon/javastravav3api) to get access to Strava dataset. The point is that I just need data to process this data locally (for example I want to make some statistics and graphs) and I need no users authenticating into some web app. I already have My API Application page (
https://www.strava.com/settings/api) with "Client ID", "Client Secret" and "Your Access Token (permisions: public)". And now the questions:
1. With what shoud I fill "Authorization Callback Domain"? As I said I'm just making requests from my own computer in order to obtain data. I've read it should work with "localhost" but I'm not sure if that's true. It may sound silly but when it comes client-server stuff I'm a total noob.
2. About javastrava implementation and what the README says about connecting. I've tried the following:
Integer clientID=the-clientID-i-got-in-registration;
String clientSecret=the-clientSecret-i-got-in-registration;
String accessToken=the-accessToken-i-got-in-registration;
AuthorisationService service = new AuthorisationServiceImpl();
Token token = service.tokenExchange(clientID,clientSecret,accessToken);
...
But I get this error which I think it has something to do with the Callback Domain:
00:43:57.469 [main] WARN javastrava.api.v3.rest.util.RetrofitErrorHandler - 400 Bad Request : StravaResponse [message=Bad Request, errors=[StravaAPIError [resource=RequestToken, field=code, code=invalid]]]
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.$Proxy16.tokenExchange(Unknown Source)
at javastrava.api.v3.auth.impl.retrofit.AuthorisationServiceImpl.tokenExchange(AuthorisationServiceImpl.java:39)
at Prueba.main(Prueba.java:16)
Caused by: retrofit.RetrofitError: 400 Bad Request
at retrofit.RetrofitError.httpError(RetrofitError.java:40)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:388)
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)
... 3 more
3. Can I access public activities from other athletes or just my own dataset?
Thank you in advance