Closed juanedi closed 5 years ago
Hmmm, this means you're hitting the OAuth 1 paths, which isn't what your request is supposed to do. We'll need to look into this.
@juanedi Hi Juanedi Am facing the same issue in Salesforce can you tell me incase if you sorted out the issue. It would be helpful. And anyone Who knows the solution please share
Thanks
Hey y'all! Sorry for the slow response, but we found the issue and we're fixing it now.
Issue 1: The error message that we were returning ("Your device's clock is off...") was incorrect due to a bug in Splitwise's server code. We should have been returning this error message: "Invalid API Request: you are not logged in". We're updating our server so that it returns the correct error message in the future.
Issue 2: Our instructions weren't clear enough about how to find the bearer token correctly. When using our sample code to obtain a Bearer token, you should NOT copy the token from the URL – that token is just an authorization code, and not an actual Bearer token. I've updated the instructions for ruby--oauth2
to print the Bearer token more clearly to the console, and added comments to help guide future developers. You can find the updated code sample here.
Hope that helps! 🙂
Cool, thanks for the explanation and for improving the docs! :-D
Hello!
I'm having trouble using the API. Here's what I did:
curl -XGET "https://secure.splitwise.com/api/v3.0/get_current_user" -H "Authorization: Bearer THE_TOKEN"
This results in:
{"error":"Your device's clock is off by more than 12 hours, and the server has rejected your request. Please correct the time on your device and try again."}
Adding the
-v
flag tu curl I see the following:Am I doing something wrong?