Another authorization for a connection that needs one: the registration held is reused when it opens, else the server registers us again.
const url = 'https://api.canopyhq.dev/connections/example/authorize';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/connections/example/authorize \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The connection to authorize again.
Responses
Section titled “Responses”The connection stands as authorizing; authorize is the URL the owner opens.
What a link answers: the connection as it stands, and, when the server demands an authorization, the URL the owner opens to grant it.
object
object
The tenant’s readable namespace for this connection’s tools.
Where a connection stands: linked with its catalog, or waiting on the owner to authorize it. A linked connection whose token set was refused and could not be refreshed reads as needing authorization again.
The result of applying a resource write at the door.
Example
{ "connection": { "auth": { "kind": "bearer" }, "state": "linked" }, "outcome": "created"}No console token, or one that did not verify.
Only an owner of the tenant may configure it.
The tenant owns no connection by that name.
The connection is not one linked through an authorization.
The server could not be registered with; nothing changed.