Hi there,
I'm trying to get the access token without success. I really don't know where is the mistake.
1. 1. https://www.car2go.com/api/reqtoken. I got without problems oauth_token and oauth_token_secret
2. h2. thttps://www.car2go.com/api/authorize?oauth_token=. I got without problems oauth_verifier.
3. 3. https://www.car2go.com/api/accesstoken. I’ve always obtained the following result -> Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="car2go_api", oauth_problem="signature_invalid"}
What I’m doing to get my oauth_signature is:
oauth_signature = computeSignature(signature_base_string, "MYSHAREDSECRET&");
signature_base_string = "POST" + "&"+ encode("https://www.car2go.com/api/accesstoken") + "&" + encode(parameter_string);
Where parameter_string is:
parameter_string = "oauth_callback=oob" +"&oauth_consumer_key=MYCONSUMERKEY" +
"&oauth_nonce=" + oauth_nonce + "&oauth_signature_method=" + oauth_signature_method + "&oauth_timestamp=" + oauth_timestamp + "&oauth_token=" + encode(oauth_token) + "&oauth_verifier=" + encode(oauth_verifier) +"&oauth_version=1.0";
Any ideas?