improved

OAuth token response now includes workspace ID and owner info

We now return a workspace_id field and an owner in the token response at the very end of the OAuth authorization flow.

workspace_id is the ID of the workspace where the integration was authorized. As a reminder, this is not intended to be unique across tokens; in future iterations of our authorization flow users may be able to authorize your integration multiple times in the same workspace.

owner contains information about who can view and share the integration. Because all integrations today can be viewed and shared by all members in the space, owner is just an object that looks like { "workspace": true } for now.

To summarize, the OAuth token response now looks like this:

FieldTypeDescriptionNot null
"access_token"stringAn access token used to authorize requests to the Notion API.
"workspace_id"stringThe ID of the workspace where this authorization took place.
"workspace_name"stringA human-readable name which can be used to display this authorization in UI.
"workspace_icon"stringA URL to an image which can be used to display this authorization in UI.
"bot_id"stringAn identifier for this authorization.
"owner"objectAn object containing information about who can view and share this integration. Always { "workspace": true } for now.