cstrnt / notion-api

Unofficial Notion.so API

Home Page:https://www.npmjs.com/package/notion-api-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid Input when doing a getPageById

RaphArbuz opened this issue · comments

Hi,

Thank you for building this module.

getPages() returns a list of pageIds, but getPageById, for any of them, returns:

{
  errorId: '8e55a984-004f-44a3-8338-a7c68617e9e4',
  name: 'ValidationError',
  message: 'Invalid input.'
}

Any idea why? I need to be able to fetch Notion tables with an API.

Many thanks!

hi, I get this error too after using my notion page's pageId as well. Manage to return the page html and attributes when I add the two other parameters to the getPageById method.

@picanteverde Is there any update on fixing this one? I'm running into it as well, and it looks like @Allgoll put out a PR for this.

I tried the API change in #18 locally, but unfortunately, I still seem to be experiencing this problem. Adding a couple of addition attributes to getPageById didn't seem to help.

@LandonSchropp it's strange. I'm using my own fork with #18 inside and my application works without this error. Maybe it's another error? Or maybe you missed something?

@Allgoll I took another look and I think I did two things wrong here:

  • The first time around, I applied your changes to my locally downloaded dist. This time, I downloaded your repo, built, and linked it directly. I think I must have accidentally edited the source instead of the dist when doing it myself locally.
  • The UUID of the data must contain hyphens. If It doesn't, the call with fail with a cryptic error.

My bad. 🙂 Thanks for the help!

I also experienced this issue. This is the only Notion API wrapper that I can find that provides HTML instead of "record maps" of the blocks, so I would really like to use it. I feel like this issue makes this package almost unusable.

Hello guys, sorry for the inactivity! It's fixed in 2.4.0 :)