The identifier of the user.
This must be in the format <externalId>@<connectionId>
where externalId
is the identity provider user identifier and and connectionId
is the User Provider connection identifier.
POST
/admin/v1/users/{userId}:importImport user from external identity provider if they don't already exist. If the user already exists in UserHub, this is a no-op.
curl https://api.userhub.com/admin/v1/users/auth0%7C123456789@conn_26yEiYymqy6ZmG:import \
-H "Authorization: Bearer $USERHUB_ADMIN_KEY" \
-X POST
const res = await adminApi.users.importAccount(
"auth0|123456789@conn_26yEiYymqy6ZmG",
);
res, err := adminApi.Users().ImportAccount(
context.Background(),
"auth0|123456789@conn_26yEiYymqy6ZmG",
nil,
)
$res = $adminApi->users->importAccount(
userId: 'auth0|123456789@conn_26yEiYymqy6ZmG',
);
res = admin_api.users.import_account(
user_id="auth0|123456789@conn_26yEiYymqy6ZmG",
)
{
"id": "usr_MKFxzgJaAH8JQ4",
"state": "ACTIVE",
"displayName": "Jane Doe",
"email": "[email protected]",
"emailVerified": false,
"address": null,
"accountConnections": [
{
"connection": {
"id": "conn_26yEiYymqy6ZmG",
"displayName": "Auth0",
"state": "ACTIVE",
"type": "AUTH0",
"delegate": null,
"providers": [],
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
},
"externalId": "auth0|123456789",
"adminUrl": "https://manage.auth0.com/dashboard/us/test/users/auth0%7C123456789",
"state": "ACTIVE",
"displayName": "Jane Doe",
"email": "[email protected]",
"emailVerified": false,
"paymentMethods": [],
"pullTime": "2024-11-15T13:00:00Z",
"pushTime": null,
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
}
],
"subscription": null,
"memberships": [],
"signupTime": "2024-11-15T13:00:00Z",
"createTime": "2024-11-15T13:00:00Z",
"updateTime": "2024-11-15T13:00:00Z"
}