Skip to content

Initiate OAuth2 identity linking

POST
/_torii/users/me/identities/oauth2
curl --request POST \
--url https://your-app.toriiauth.eu/_torii/users/me/identities/oauth2 \
--header 'Content-Type: application/json' \
--data '{ "provider": "example", "redirectPath": "example", "proxyOrigin": "example", "completion": "sdk" }'
Host
string
Media typeapplication/json
object
provider
required
string
redirectPath
required
string
proxyOrigin
string | null
completion

sdk: the callback lands on #__torii_link_pending and the SDK finishes the link with POST /oauth2/complete. Omitted: the callback links directly (legacy).

string | null
Allowed values: sdk

OK

Media type*/*
object

invalid_request: unknown completion, or a start without completion: "sdk" once enforcement is on

Media typeapplication/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}