Twitter API

21 views
Skip to first unread message

Tulasidas Uppu

unread,
Apr 21, 2018, 7:16:43 AM4/21/18
to open...@sik.one
Since our last discussion on this, I tried many ways but failing to get a valid bearer token. See attached document.

Thanks,
Tulasi
Twitter.pdf

hi sikone

unread,
Apr 22, 2018, 10:42:33 PM4/22/18
to open...@sik.one

hi tulasi

1. https://developer.twitter.com/en/account/environments suggests to create dev env to run 'search-full-archive', and presently there is no such env

is it that we need to create this env and then run the queries using it

2. also could you please change the security keys and the previous one are public and a security threat if we continue using them

please let me know if i can do more on this

cheers
suman

--
this group is managed by http://sik.one, for more info please refer http://sik.one/service/open-work
---
You received this message because you are subscribed to the Google Groups "open-work" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-work+...@sik.one.
To post to this group, send email to open...@sik.one.
Visit this group at https://groups.google.com/a/sik.one/group/open-work/.
To view this discussion on the web visit https://groups.google.com/a/sik.one/d/msgid/open-work/CABOA2yx%3D6d7ryc6AOJLBPOoC%3Do%3DB-%2BPMj9NKd_iDGLBvuFLmxg%40mail.gmail.com.
For more options, visit https://groups.google.com/a/sik.one/d/optout.

Tulasidas Uppu

unread,
Apr 23, 2018, 11:05:51 PM4/23/18
to open...@sik.one
Hi Suman,

I tried both the steps but still same error. As per twitter api document everything following correctly, still same error. See the output, no idea where it is going wrong.

before encode = jE5jZ0keNl8lDxFGyR3kZju3v:J0XWbKc6k82A7zxKwMFgY3dxamJ2vv3a6Zu9tjtFqy1ZWEMrOB
base64 encoded = b'akU1alowa2VObDhsRHhGR3lSM2taanUzdjpKMFhXYktjNms4MkE3enhLd01GZ1kzZHhhbUoydnYzYTZadTl0anRGcXkxWldFTXJPQg=='
decoded string = jE5jZ0keNl8lDxFGyR3kZju3v:J0XWbKc6k82A7zxKwMFgY3dxamJ2vv3a6Zu9tjtFqy1ZWEMrOB
{'errors': [{'code': 99, 'message': 'Unable to verify your credentials', 'label': 'authenticity_token_error'}]}

Thanks,
Tulasi

hi sikone

unread,
May 4, 2018, 1:48:54 AM5/4/18
to open...@sik.one
tulasi

could you please try the python example as mentioned at https://developer.twitter.com/en/docs/tweets/search/overview/premium#

it uses github based code and suggests something like endpoint in yaml file, etc

also i've regenerated keys, so pick the fresh ones
and please don't email here code having these keys, like you sent in last email, as this open...@sik.one is open/ publically-visible group

hope it's fine.. please let me know if i can do more

cheers
suman

Tulasidas Uppu

unread,
May 5, 2018, 3:08:33 AM5/5/18
to open...@sik.one
Suman,

Tried that as well, here is what I am getting:

Grabbing bearer token from OAUTH
retrying request; current status code: 403
retrying request; current status code: 403
retrying request; current status code: 403
HTTP Error code: 403: Forbidden: Authentication succeeded but account is not authorized to access this resource.
Rule payload: {'query': 'democracy', 'maxResults': 100}

Let me know if you need any more details.

Thanks,
Tulasi

Tulasidas Uppu

unread,
May 5, 2018, 6:41:55 AM5/5/18
to open...@sik.one
Suman,

As per whatsapp conversion, this endpoint 'https://api.twitter.com/1.1/tweets/search/fullarchive/openworkdev.json worked.

Searched "suman bahuguna" and this is what I am getting

Launched A Book 'BAGIYA' OF my friend Dr Suman Kundi with Sri Anil Dubey ji and Rita Bahuguna Joshi ji. It was great to be on stage with the friend who was with me in college and today she is a poet....
@bstvlive @AnilDubeyRLD https://t.co/ATaoH8bCfb

@suman_bahuguna https://t.co/d2JMzILjdS

@suman_bahuguna @JagranNews @newslaundry Yeh story Hindi main hi hai: https://t.co/HhV2vYEUee

@suman_bahuguna @Devinder_Sharma @AtishiMarlena https://t.co/tzKk6J4Ild
@Devinder_Sharma @AtishiMarlena @PMOIndia Staff .... How SICK can you get ???

You are removing people who are WORKING for OUR KIDS now ???

To satisfy modis LUST for Power ???

How SICK !!!

@Devinder_Sharma @AtishiMarlena yes @AtishiMarlena 's work is extremely inspiring.. @Devinder_Sharma thanks for appreciation.. on the other hand not just mha but acts of central government are highly discouraging and very sad

I liked a @YouTube video https://t.co/TxxSsQiqwX Husain Haqqani On Reimagining Pakistan


hi sikone

unread,
May 5, 2018, 8:00:57 AM5/5/18
to open...@sik.one
thanks tulasi

as we discussed on talk you're going to find 
  1. if we've access to twitter full archive
  2. exact search for 'direct democracy'
  3. and if yes then start work on finding how we can filter / analyse further so that
  4. we get twitter accounts from india or sub-region (states, union territories, cities, etc) that are in favor or doing similar work as we do.. say by focusing on terms like
  5. 'civic technology' or 'civic tech'
  6. swaraj
  7. 'liquid democracy'
  8. 'people participation'
  9. 'democratic reform'.... etc
cheers
suman

Tulasidas Uppu

unread,
May 6, 2018, 12:00:40 AM5/6/18
to open...@sik.one
Unfortunately for every simple search I am getting below error:

HTTP Error code: 429: Request exceeds account’s current query limits. Please upgrade to the next package level and retry.
Rule payload: {'query': 'Direct Democracy', 'maxResults': 100}

It worked in the beginning and now stopped. Looks like we have reached the limit.


Reply all
Reply to author
Forward
0 new messages