Link a sign-in identity to a member
const url = 'https://gpu-kitchen.example.lan/api/v1/members/example/identities';const options = { method: 'POST', headers: {cookie: 'gpuk_session=<gpuk_session>', 'Content-Type': 'application/json'}, body: '{"provider_id":1,"subject":"example"}'};
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://gpu-kitchen.example.lan/api/v1/members/example/identities \ --header 'Content-Type: application/json' \ --cookie gpuk_session=<gpuk_session> \ --data '{ "provider_id": 1, "subject": "example" }'Answers 201 when the identity is linked now, 200 when it was already this member’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "provider_id": 1, "subject": "example"}Responses
Section titled “Responses”Success, it already existed.
object
object
object
Example
{ "member": { "role": "super_admin" }}Created.
object
object
object
Example
{ "member": { "role": "super_admin" }}Error codes: invalid_subject, validation_error.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: auth_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: admin_required, forbidden, session_required, super_admin_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: member_not_found, provider_not_found.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: identity_already_linked.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: payload_too_large.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}