Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to validate my notion token on running create-table.js #47

Open
utkarshshh opened this issue Oct 15, 2020 · 5 comments
Open

Unable to validate my notion token on running create-table.js #47

utkarshshh opened this issue Oct 15, 2020 · 5 comments

Comments

@utkarshshh
Copy link

utkarshshh commented Oct 15, 2020

So I have tried to run create_table and got this error. I am pulling token_v2 from my notion cookies and using the last part of my pages table slug as blog_index_id. Sharing a snip of that as well.

Additionally, I created a manual table to work around this but seems like vercel doesn't hit it. Where am I going wrong in both cases?
Screenshot 2020-10-15 at 8 21 08 AM
Screenshot 2020-10-15 at 8 21 27 AM

STACK
NOTION_TOKEN='notion_token' BLOG_INDEX_ID='id' node scripts/create-table.js (node:71470) UnhandledPromiseRejectionWarning: Error: failed to get Notion user id, request status: 401 at getUserId (/Users/utkarshgupta/Documents/GitHub/notion-blog/src/lib/notion/createTable.js:366:11) at processTicksAndRejections (internal/process/task_queues.js:86:5) (node:71470) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:71470) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@utkarshshh utkarshshh changed the title Seems like my Notion token is not getting recognise Seems like my Notion token is not getting recognised Oct 15, 2020
@utkarshshh utkarshshh changed the title Seems like my Notion token is not getting recognised Unable to validate my notion token on running create-table.js Oct 15, 2020
@sadnessOjisan
Copy link

I have same trouble.

@yukiorita1117
Copy link

Is there a solution to this problem?

@huythai855
Copy link

[Fixed]

I stuck in this issue last night and finally i fixed it.
I think you guys take the wrong token_v2 string format:

I copied this token_v2 string format from brower into my .env file and got the same result (error):
image

☑️ Then, I tried to copy the whole string, and it works correctly:
image

@theSalafee
Copy link

I continue to get this same type of error:
image

@jt-wang
Copy link

jt-wang commented Aug 18, 2023

[Fixed]

I stuck in this issue last night and finally i fixed it. I think you guys take the wrong token_v2 string format:

I copied this token_v2 string format from brower into my .env file and got the same result (error): image

Then, I tried to copy the whole string, and it works correctly: image

@theSalafee you may give Then, I tried to copy the whole string, and it works correctly a try. It works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants