import json
import os
from parable_types_web_api import ConfirmSourceAccountLinkInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = ConfirmSourceAccountLinkInput.model_validate(
json.loads("{\"providerKey\":\"550e8400-e29b-41d4-a716-446655440000\",\"principalKey\":\"example\",\"email\":\"person@example.com\"}"),
)
result = sdk.provider_policies.confirm_source_account_link(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.ConfirmSourceAccountLinkInput
if err := json.Unmarshal([]byte(`{"providerKey":"550e8400-e29b-41d4-a716-446655440000","principalKey":"example","email":"person@example.com"}`), &input); err != nil {
return err
}
result, err := sdk.ProviderPoliciesNamespace.ConfirmSourceAccountLink(ctx, input){
"data": {
"confirmedAt": "2023-11-07T05:31:56Z",
"confirmedBy": "<string>",
"id": "<string>",
"member": {
"email": "jsmith@example.com",
"userId": "<string>"
},
"memberActive": true,
"principalKey": "<string>",
"providerKey": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Too Many Requests{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Link a source account to a member
Records that a source user account of a Provider belongs to the active member of the selected Workspace who signs in with the given email, when no exact identity link joins them. From the next access run, the member reads what that account may open in the Provider, as through an exact identity link, while the member is active and the account is an active user in the Provider. An account has at most one live link. Confirming the link that already exists returns it and changes nothing. Each new link is recorded in the audit trail with the person, the account and the member.
import json
import os
from parable_types_web_api import ConfirmSourceAccountLinkInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = ConfirmSourceAccountLinkInput.model_validate(
json.loads("{\"providerKey\":\"550e8400-e29b-41d4-a716-446655440000\",\"principalKey\":\"example\",\"email\":\"person@example.com\"}"),
)
result = sdk.provider_policies.confirm_source_account_link(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.ConfirmSourceAccountLinkInput
if err := json.Unmarshal([]byte(`{"providerKey":"550e8400-e29b-41d4-a716-446655440000","principalKey":"example","email":"person@example.com"}`), &input); err != nil {
return err
}
result, err := sdk.ProviderPoliciesNamespace.ConfirmSourceAccountLink(ctx, input){
"data": {
"confirmedAt": "2023-11-07T05:31:56Z",
"confirmedBy": "<string>",
"id": "<string>",
"member": {
"email": "jsmith@example.com",
"userId": "<string>"
},
"memberActive": true,
"principalKey": "<string>",
"providerKey": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Too Many Requests{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Access
This operation needs a Parable token. An MCP token cannot call it. See Authentication for the kinds of token. Your roles must granttenant.providerpolicies.manage.
Errors
WA-PP-011: No active member of the Workspace signs in with this email. Enter the email that a member of this Workspace signs in with.WA-PP-013: The account is already linked to another member. Remove the account’s link first, then link it to this member.WA-PP-015: The account is not a user account of a Provider in the catalog. Choose an account from the Unlinked accounts view.
Authorizations
A personal access token, which starts with pat_. A Parable token can call each operation that the roles of its owner allow. An MCP token can call only the read operations that are open to agents. A SQL token does not work on this API.
Headers
Workspace slug. Overrides subdomain-based workspace resolution when provided.
"acme"
Optional request correlation ID echoed back in the response.
"550e8400-e29b-41d4-a716-446655440000"
Body
Links one source account to the member who signs in with email.
The email the member signs in with.
255^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$The account's principal key, user:<source id>, as the Unlinked
accounts view lists it.
6 - 1024UUID v4 with automatic base62 encoding for client-facing APIs
^([0-9A-Za-z]{1,22}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Response
Successful response
A source account a Workspace administrator linked to a member; spec 0095 "Admin-confirmed links"). On each access run the member's login email gets the account's tokens, as through an exact identity link, while the member is active and the account is an active user in the Provider.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes