cURL
curl -X POST \
/user/complete \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
}'import requests
url = "https://coreapi.io/user/complete"
payload = {
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({firstName: 'John', lastName: 'Doe', company: 'Acme Inc.'})
};
fetch('https://coreapi.io/user/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/user/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'company' => 'Acme Inc.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"firstName": "John",
"lastName": "Doe",
"email": "jsmith@example.com",
"id": "01F9Z3ZJXZQZJZJZJZJZJZJZJZ",
"defaultAccount": "https://example.com/",
"createdAt": "2023-11-07T05:31:56Z",
"confirmToken": "<string>",
"confirmTokenValidUntil": "2023-11-07T05:31:56Z",
"updatedAt": "2021-01-01T00:00:00+00:00",
"confirmed": true,
"userIdentifier": "<string>",
"passwordEqual": true,
"completed": true,
"name": "<string>",
"superAdmin": true,
"passwordRecoveryTokenExpired": true,
"resetPasswordToken": "<string>",
"resetPasswordTokenExpiresAt": "2023-11-07T05:31:56Z"
}User
Complete the user registration
Complete the user registration
Required permissions:user:writePOST
/
user
/
complete
cURL
curl -X POST \
/user/complete \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
}'import requests
url = "https://coreapi.io/user/complete"
payload = {
"firstName": "John",
"lastName": "Doe",
"company": "Acme Inc."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({firstName: 'John', lastName: 'Doe', company: 'Acme Inc.'})
};
fetch('https://coreapi.io/user/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/user/complete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => 'John',
'lastName' => 'Doe',
'company' => 'Acme Inc.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"firstName": "John",
"lastName": "Doe",
"email": "jsmith@example.com",
"id": "01F9Z3ZJXZQZJZJZJZJZJZJZJZ",
"defaultAccount": "https://example.com/",
"createdAt": "2023-11-07T05:31:56Z",
"confirmToken": "<string>",
"confirmTokenValidUntil": "2023-11-07T05:31:56Z",
"updatedAt": "2021-01-01T00:00:00+00:00",
"confirmed": true,
"userIdentifier": "<string>",
"passwordEqual": true,
"completed": true,
"name": "<string>",
"superAdmin": true,
"passwordRecoveryTokenExpired": true,
"resetPasswordToken": "<string>",
"resetPasswordTokenExpiresAt": "2023-11-07T05:31:56Z"
}Autorisierungen
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsontext/html
The new User resource
Antwort
User resource created
The firstname of the user
Required string length:
2 - 255Beispiel:
"John"
The lastname of the user
Required string length:
2 - 255Beispiel:
"Doe"
Beispiel:
"01F9Z3ZJXZQZJZJZJZJZJZJZJZ"
Beispiel:
"https://example.com/"
The date and time when the resource was last updated.
Beispiel:
"2021-01-01T00:00:00+00:00"
War diese Seite hilfreich?