Complete an external integration account link
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/external-integrations/link/complete \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"token": "intlink_random_abc123"
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'intlink_random_abc123'})
};
fetch('https://api.acornops.dev/api/v1/auth/external-integrations/link/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "linked",
"link": {
"id": "<string>",
"integrationClientId": "<string>",
"provider": "<string>",
"clientDisplayName": "<string>",
"externalUserId": "<string>",
"linkedAt": "2023-11-07T05:31:56Z",
"lastAuthenticatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"grants": [
{
"workspaceId": "<string>",
"capabilities": [
"<string>"
],
"grantedByUserId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"externalDisplayName": "<string>",
"grantableWorkspaces": [
{
"workspaceId": "<string>",
"workspaceName": "<string>",
"role": "<string>",
"grantedCapabilities": [
"<string>"
],
"grantableCapabilities": [
"<string>"
]
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Auth and users
Complete an external integration account link
Authenticated browser-session endpoint used by the management console after password or OIDC sign-in and explicit user approval. It consumes a valid short-lived external integration link token and binds the external user id to the signed-in AcornOps user.
Complete an external integration account link
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/external-integrations/link/complete \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"token": "intlink_random_abc123"
}
'const options = {
method: 'POST',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'intlink_random_abc123'})
};
fetch('https://api.acornops.dev/api/v1/auth/external-integrations/link/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "linked",
"link": {
"id": "<string>",
"integrationClientId": "<string>",
"provider": "<string>",
"clientDisplayName": "<string>",
"externalUserId": "<string>",
"linkedAt": "2023-11-07T05:31:56Z",
"lastAuthenticatedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"grants": [
{
"workspaceId": "<string>",
"capabilities": [
"<string>"
],
"grantedByUserId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"externalDisplayName": "<string>",
"grantableWorkspaces": [
{
"workspaceId": "<string>",
"workspaceName": "<string>",
"role": "<string>",
"grantedCapabilities": [
"<string>"
],
"grantableCapabilities": [
"<string>"
]
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}