Waiting list


#1

Hi,

When can I expect to get access to the new Premium APIs? I asked access more than 2 months ago and no response. I’m building an app that’s fully based on the Search endpoint and now that I’m getting about to finish it I would need to access the new Premium APIs.

Thanks.


#2

@phuthi_7 what was the @handle and appID you used to apply?


#3

Hi,

I think it was @phuthi_7 and appID was
fZjpfUxtn8qm6UBIgFmXVNUqa.

Kind regards,

Phuthi


#5

It looks like you’re approved with the environment name: env-beta


#6

Thank you very much


#7

So when I go to manage my environments I am still requested to set up an environment. Are you referring to the same thing?


#8

During the beta period, the Account Activity API environments do not show up on the dashboard, so if you’re whitelisted for access it will not appear and you do not need to create an environment yourself, the name of your environment will be env-beta.


#9

Hi,

Only now have I been able to start testing this access and what I realize is that what will work for me is the Premium Sandbox 30-day/Full-Archive search API endpoints. I have created environments under the 30 day however when I search, nothing is returned. Do I need to request specific access to start using the endpoints?

Thanks and regards,

Phuthi


#10

What terms are you using to search for? Can you provide an example of how you’re calling the API?


#11

Am using the GET call:

GET https://api.twitter.com/1.1/tweets/search/30day/betaenv.json?q=citypower&count=99&result_type=recent

When I use GET https://api.twitter.com/1.1/search/tweets.json?q=citypower&count=99&result_type=recent I do get results.

Am also using the following keys on the app called '“Feed_001”

$consumerkey = ";


#12

Premium search has a different query format. I’d suggest checking the documentation. https://developer.twitter.com/en/docs/tweets/search/guides/integrating-premium


#13

Ok great thank you.


#14

Hi,

I have read the documentation and am now using this premium search call however I am not receiving results. I do recieve results however with the public search api.

$hashtags_text = “CityPowerJhb”;
$twitterhashtag = urlencode($hashtags_text);

get https://api.twitter.com/1.1/tweets/search/30day/dev.json?query=CityPowerJhb&maxResults=99;


#15

I’ve just successfully run a search on the 30 day endpoint for that string, and got results. Are you able to get results for any query on the premium search API?


#16

No I get results only when I use the standard search API. Below are the credentials I use when trying to use the Premium API:

$consumerkey = “2gxxxxxWd”;
$consumersecret = “2dxxxxxxxlPy3Y”;
$accesstoken = “50xxxxxxFSW”;
$accesstokensecret = “tNtxxxxJVc1”;


#17

Please never share your access token and secret in public forums as they can compromise your account.

The premium API uses a Bearer Token for access (also known as app-only authentication). You can use a script like this one to generate a Bearer Token given a valid consumer key/secret pair.


#18

Ok thank you. Sorry about that … let me generate new keys…


#19

Hi,

I’ve been able to authenticate using the bearer token however I get the below error:…

…when I run this code: curl -X GET “https://api.twitter.com/1.1/tweets/search/30day/dev.json?query=CityPowerJhb&maxResults=99” -H “Authorization: Bearer TOKEN”


#20

@phuthi_7 - maxResults needs to be between 100 and 500, I would recommend ALWAYS using maxResults=500 there is no reason not to.


#21

I changed it to max results 500. I am still getting the below error message:

object(stdClass)#5 (1) { [“error”]=> object(stdClass)#6 (3) { [“message”]=> string(90) "Forbidden: Authentication succeeded but account is not authorized to access this resource. " [“sent”]=> string(25) “2018-06-12T08:43:08+00:00” [“transactionId”]=> string(16) “00c0efb700b426d2” } }

Please note that I am using the sandbox and query using the below:

curl -X GET “https://api.twitter.com/1.1/tweets/search/30day/dev.json?query=CityPowerJhb&maxResults=500
” -H “Authorization: Bearer TOKEN”