Link User
POST
/api/v3/projects/{project_id}/users/links
const url = 'https://example.com/api/v3/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/users/links';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"display_name":"example","external_user_id":"example","profile":{},"provider_name":"app"}'};
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://example.com/api/v3/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/users/links \ --header 'Content-Type: application/json' \ --data '{ "display_name": "example", "external_user_id": "example", "profile": {}, "provider_name": "app" }'Create or resolve one durable mapping from trusted app identity to GA user.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string format: uuid
Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
UserLinkResponseV3
object
status
required
Status
string
user
required
UserResponseV3
object
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
preferred_channel
required
Preferred Channel
string
project_id
required
Project Id
string format: uuid
status
required
Status
string
Example
{ "status": "linked"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}