Jean Lebrument
Jean Lebrument

Reputation: 5169

Verify credentials provided by Fabric Digits on server-side return "Error 32 - Could not authenticate you."

I'm writing a micro-service that permits to create a user on my backend from valid credentials provided by Fabric Digits.

I get the credentials from the Digits iOS SDK on my iOS client with this code:

Digits *digits = [Digits sharedInstance];
DGTOAuthSigning *oauthSigning = [[DGTOAuthSigning alloc] initWithAuthConfig:digits.authConfig authSession:digits.session];
NSDictionary *authHeaders = [oauthSigning OAuthEchoHeadersToVerifyCredentials];  

And I past the content of authHeaders[@"X-Verify-Credentials-Authorization"] in the following curl request:

curl --get 'https://api.twitter.com/1.1/account/verify_credentials.json' --header 'Authorization: OAuth oauth_signature="xxxx",oauth_nonce="xxxx",oauth_timestamp="1449582920",oauth_consumer_key="xxxx",oauth_token="xxxx",oauth_version="1.0",oauth_signature_method="HMAC-SHA1"' --verbose

Unfortunately, I get this error as a response from Twitter API:

{"code":32,"message":"Could not authenticate you."}

I found other threads on SO with this problem, but none of the answers helped me.

Any suggestions?

Upvotes: 3

Views: 715

Answers (1)

Sudhanshu Gaur
Sudhanshu Gaur

Reputation: 7684

Don't use https://api.twitter.com/1.1/account/verify_credentials.json url for sending authorization headers use this https://dev.twitter.com/rest/reference/get/account/verify_credentials i was having same problem but now it s working completely fine please let me know whether it is working for you now or not.

Upvotes: 2

Related Questions