Full archive sandbox using python

python

#1

This is my first time to deal with full archive sandbox and I had an error I hope someone help me.
I did same this code:
http://benalexkeen.com/interacting-with-the-twitter-api-using-python/

I defined my keys and create a dev environment
but on requests step I get an error

> auth_resp.status_code
 403
> auth_resp.json().keys()
 dict_keys(['errors'])
> access_token = auth_resp.json()[access_token]
NameError                                 Traceback (most recent call last)
<ipython-input-37-176830b5137e> in <module>
      1 # Keys in data response are token_type (bearer) and access_token (your access token)
----> 2 access_token = auth_resp.json()
[access_token]

NameError: name 'access_token' is not defined

I tried to write my access token but it gives me the same error


KeyError                                  Traceback (most recent call last)
<ipython-input-38-f2c1b01734fe> in <module>
      1 # Keys in data response are token_type (bearer) and access_token (your access token)
----> 2 access_token = auth_resp.json()[accessToken]

KeyError: 'my accessToken '

#2

That tutorial is for the standard API it looks like, also, you can create your own keys in the developer app dashboard so you can skip that step to simplify things. I’d look at https://github.com/twitterdev/search-tweets-python for an example of how to use the premium API