I keep getting a 404 error with “object_not_found” when I try to make API calls to my Notion database. I have already set up the integration and connected it to my database but still getting this issue.
I made sure to use the right bearer token from my integration settings. The database is properly linked to my custom integration and my workspace has the integration enabled too.
I tried following the official Notion API documentation for setting up connections but something is still not working right. The database ID looks correct and I can see the connection is active in my Notion settings.
What could be causing this 404 response even when everything seems to be configured properly?
It sounds like you’ve followed the right steps, and your setup seems correct. A common issue can arise from using the wrong database ID, so ensure you’re using the database ID and not the page ID. Additionally, verify that your integration has explicit permissions for that database in your Notion settings. If the problem persists, consider regenerating your API key and reconnecting your integration. Sometimes, this can resolve hidden configuration problems that might not be immediately evident.
check your database url - notion sometimes changes the database id when you duplicate or move things. Also verify your integration has read permissions, not just workspace access. had this exact issue last week cause i was using an old database id from my bookmarks.
The database ID extraction is probably your issue. Copy the 32-character string that comes after the last slash in your Notion URL, but before any query parameters. Don’t include hyphens and make sure you’re not missing parts of the ID. Also check that your integration actually has access to that specific database—workspace access alone won’t cut it. Before you dig deeper into the database call, test a basic GET request to another endpoint first. That’ll tell you if your authentication is even working.