Could not authenticate after upgrading to pau


#1

Hi,

We’ve just upgraded our Premium API account from Sandbox access to the paid service but now getting an authentication error despite using the same credentials and app-id:

Note - this happens when using Postman

{
“error”: {
“message”: “Could not authenticate you.”,
“sent”: “2018-11-06T17:34:01+00:00”,
“transactionId”: “0068de3c00bd1542”
}
}

Can you advise please?

Kind Regards,
Jamie.


#2

PS: Able to get a bit further by using some C# code rather than Postman but now we dont get any data back, despite using the same parameters as before. Can you assist please?

cc:
@andypiper @Aurelia

{“results”:,“next”:“eyJhdXRoZW50aWNpdHkiOiJlYzhkYmJkNzBlYjNkOWM3ZGQ5ZmI5MTU0MzRmMDM5NDI3YzdjMTBlMWU3MTZmYThmYTBiZGY5ODU4NGFhZTA5IiwiZnJvbURhdGUiOiIyMDA2MTIyMjAwMDAiLCJ0b0RhdGUiOiIyMDE4MTEwNjE4MzQiLCJuZXh0IjoiMjAxODEwMDYxODM0MjAtMC0wIn0=”,“requestParameters”:{“maxResults”:100,“fromDate”:“200612220000”,“toDate”:“201811061834”}}


#3

Are you using a bearer token in postman?


#4

Hi, thanks for replying
Here is what we have:
image

Which translates to: (the code Postman generates)

var client = new RestClient(“https://api.twitter.com/1.1/tweets/search/fullarchive/ProdFullArchive.json?fromDate=200612220000&query=from%3Ajoelsartore&maxResults=500”);
var request = new RestRequest(Method.GET);
request.AddHeader(“postman-token”, “3d99f70d-b01a-97a6-aa65-8a9f6965346c”);
request.AddHeader(“cache-control”, “no-cache”);
request.AddHeader(“authorization”, “OAuth oauth_consumer_key=“RCA0644lFiOfvX1m4TcvBXzdR”,oauth_token=“958676983-tKavguohyw3VpjLYSpAFWo5hZXPYa34H3Sa1tJdo”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1541571323”,oauth_nonce=“D1Q46Q”,oauth_version=“1.0”,oauth_signature=“PJxnfsDLTs7bJMLpmN2bV79Ix1c%3D””);
IRestResponse response = client.Execute(request);

or, taking the curl code in Postman:
curl -X GET
https://api.twitter.com/1.1/tweets/search/fullarchive/ProdFullArchive.json?fromDate=200612220000&query=from%3Ajoelsartore&maxResults=500
-H ‘authorization: OAuth oauth_consumer_key=“RCA0644lFiOfvX1m4TcvBXzdR”,oauth_token=“958676983-tKavguohyw3VpjLYSpAFWo5hZXPYa34H3Sa1tJdo”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1541571323”,oauth_nonce=“D1Q46Q”,oauth_version=“1.0”,oauth_signature=“PJxnfsDLTs7bJMLpmN2bV79Ix1c%3D”’
-H ‘cache-control: no-cache’
-H ‘postman-token: ff64569d-d207-0750-e165-215f0e23e91c’

And in our Authorization Header section:

OAuth oauth_consumer_key=“RCA0644lFiOfvX1m4TcvBXzdR”,oauth_token=“958676983-tKavguohyw3VpjLYSpAFWo5hZXPYa34H3Sa1tJdo”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1541571323”,oauth_nonce=“D1Q46Q”,oauth_version=“1.0”,oauth_signature=“PJxnfsDLTs7bJMLpmN2bV79Ix1c%3D”


#5

Ok so you’re not using a bearer token. I’d suggest checking the docs and trying something straightforward with curl as documented here.

https://developer.twitter.com/en/docs/tweets/search/api-reference/premium-search.html


#6

We’ll check that out.
Thing is, it works successfully against this endpoint:
https://api.twitter.com/1.1/statuses/lookup.json?id=1057370424101736448

curl -X GET
https://api.twitter.com/1.1/statuses/lookup.json?id=1057370424101736448
-H ‘authorization: OAuth oauth_consumer_key=“RCA0644lFiOfvX1m4TcvBXzdR”,oauth_token=“958676983-tKavguohyw3VpjLYSpAFWo5hZXPYa34H3Sa1tJdo”,oauth_signature_method=“HMAC-SHA1”,oauth_timestamp=“1541572139”,oauth_nonce=“IQPPiR”,oauth_version=“1.0”,oauth_signature=“8SzUnlDBv5f3SvHj907Tj4gtgxs%3D”’
-H ‘cache-control: no-cache’
-H ‘postman-token: b3de23d8-4968-86bf-81da-ea77d33b5bcd’


#7

The premium API and standard API are different, please check the documentation and try the samples listed. Thanks.


#8

Will do, the premium sandbox API worked hard with this request, is the paid premium api also different from the sandbox premium api? Thanks.


#9

No, premium should work regardless of the tier.


#10

Strange…will retry and feedback! :slight_smile:


#11

Hi, we believe Postman isn’t encoding one of the string as per the documentation but our application is

“Concatenate the encoded consumer key, a colon character ”:”, and the encoded consumer secret into a single string”_

…We can probably close this issue out.


#12