Access Token Request

280 views
Skip to first unread message

Caterina Tormo

unread,
Jul 23, 2013, 4:03:00 AM7/23/13
to car2go-...@googlegroups.com

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?
Thanks in advance,
Caterina

Caterina Tormo

unread,
Jul 23, 2013, 8:58:23 AM7/23/13
to car2go-...@googlegroups.com
Fixed it! :)
Reply all
Reply to author
Forward
0 new messages