Skip to content

KeyError when I try to connect the Client #23

Answered by Midnitte
akarri2001 asked this question in Q&A
Discussion options

You must be logged in to vote

I believe you need TOKEN to be in quotations

from notion_client import Client
from notion_client.api_endpoints import DatabasesEndpoint
os.environ['NOTION_TOKEN'] = "secret_token_here"
notion = Client(auth=os.environ["NOTION_TOKEN"])

from pprint import pprint

list_of_users = notion.users.list()
pprint(list_of_users.json())```

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@akarri2001
Comment options

Answer selected by akarri2001
Comment options

You must be logged in to vote
1 reply
@akarri2001
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants