3

I'm using react-notion-x. And I'm trying to render our private pages. As stated here, we added these:

const notion = new NotionAPI({
  activeUser: process.env.ACTIVE_USER,
  authToken: process.env.TOKEN_V2
})

And the ACTIVE_USER and TOKEN_V2 are retrieved using the dev tools:

Development Tools > Application > Cookie > and Copy the token_v2 and notion_user_id

The problem is that occasionally the token_v2 and/or the notion_user_id changes. When it happens, our app won't be able to load those pages by surprise. Which in turn would force us to manually copy it again and reboot the server for the environment changes to take effect.

My question is:

  1. Is there a way to automate in getting the token data in Dev Tools?
thisNeil
  • 73
  • 1
  • 3
  • 11

0 Answers0