Closed ToysoftInc closed 6 years ago
Not sure why it's difficult to do but I followed the instructions and getting error.
Intent intent = StravaLogin.withContext(this) .withClientID(STRAVA_CLIENT_ID) .withRedirectURI("localhost") .withApprovalPrompt(ApprovalPrompt.AUTO) .withAccessScope(AccessScope.VIEW_PRIVATE_WRITE) .makeIntent(); startActivityForResult(intent, REQUEST_STRAVA_LOGIN);
Got this error:
{"message": "Bad request","errors":[{resource":"Application","field":"redirect_uri", "code":"invalid"}]}
Edit: fixed my problem. It was the uri
I guess you already figured it out, but the redirect URI needs to match the one you told Strava when you registered your application, as stated in the error message and the README.
Not sure why it's difficult to do but I followed the instructions and getting error.
Intent intent = StravaLogin.withContext(this) .withClientID(STRAVA_CLIENT_ID) .withRedirectURI("localhost") .withApprovalPrompt(ApprovalPrompt.AUTO) .withAccessScope(AccessScope.VIEW_PRIVATE_WRITE) .makeIntent(); startActivityForResult(intent, REQUEST_STRAVA_LOGIN);
Got this error:
{"message": "Bad request","errors":[{resource":"Application","field":"redirect_uri", "code":"invalid"}]}
Edit: fixed my problem. It was the uri