improved
OAuth token response now includes workspace ID and owner info
over 3 years ago by Christine Wang
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:
Field | Type | Description | Not null |
---|---|---|---|
"access_token" | string | An access token used to authorize requests to the Notion API. | ✅ |
"workspace_id" | string | The ID of the workspace where this authorization took place. | ✅ |
"workspace_name" | string | A human-readable name which can be used to display this authorization in UI. | |
"workspace_icon" | string | A URL to an image which can be used to display this authorization in UI. | |
"bot_id" | string | An identifier for this authorization. | ✅ |
"owner" | object | An object containing information about who can view and share this integration. Always { "workspace": true } for now. | ✅ |