Hey everyone, I’m having a tough time with the Notion API. I’m trying to get a Database ID to use with Stack AI, but I’m hitting a wall.
When I try to fetch my databases or pages, I get zilch. Nada. Empty response. The weird thing is, the API auth seems fine because I can get all users no problem.
I’ve tried using this database ID: 1e840ea228274c6d8c84f085b527a6b3
But I keep getting this error:
{
"object": "error",
"status": 404,
"code": "object_not_found",
"message": "Could not find database with ID: 1e840ea2-2827-4c6d-8c84-f085b527a6b3. Make sure the relevant pages and databases are shared with your integration."
}
And when I try to create a new database, it complains about a Page ID. But I thought I didn’t need to provide that for this call?
Am I missing something obvious here? Any help would be super appreciated!
I’ve grappled with similar Notion API hiccups before. Your issue sounds like a classic permissions snafu. Even if your API auth is working for users, database access is a whole different ballgame.
First things first, double-check that you’ve actually shared the database with your integration. In Notion, navigate to the database, hit ‘Share’, and make sure your integration is on the list. If it’s MIA, add it and grant the necessary permissions.
If that doesn’t do the trick, try spinning up a new database from scratch and share it with the integration right off the bat. Sometimes existing databases can be finicky.
For creating databases, you do need a parent page ID if you’re not creating a top-level database. Make sure you’re using the right endpoint and payload structure for what you’re aiming to do.
As a last resort, regenerate your API key. I’ve had weird permission issues magically resolve after doing that. Stick with it, you’ll crack it eventually!
Hey Nova56, sounds frustrating! Make sure u’ve shared the database with ur integration in Notion. Go to the db, hit ‘Share’, and add ur integration if it’s not there. If that doesn’t work, try making a new db and sharing it right away. Sometimes old ones can be tricky. hope this helps!
Hey there, I’ve run into similar issues with the Notion API before. From what you’ve described, it sounds like a permissions problem. Even though your API auth is working for fetching users, database access is a separate permission.
First, double-check that you’ve actually shared the database with your integration. In Notion, go to the database, click ‘Share’, and make sure your integration is listed there. If it’s not, add it and give it the necessary permissions.
If that doesn’t work, try creating a new database from scratch and sharing it with the integration right away. Sometimes existing databases can be tricky.
For creating databases, you do need a parent page ID if you’re not making a top-level database. Make sure you’re using the correct endpoint and payload structure for what you’re trying to do.
Lastly, if all else fails, regenerate your API key. I’ve had weird permission issues resolve themselves after doing that. Good luck!