Zum Hauptinhalt springen

Get your account information. Replaced by GET /v2/users/self

GET/v2/users/self/personal-information
API-Version
v2
Request-Methode
GET
Operation-ID
deprecated-user-get-own-account

Request​

Responses​

Format
application/json
Beschreibung

Account information.

  • emailstring (email)
  • mfaDetailsobject

    The users mfa details.

    • mfaConfirmedboolean
    • mfaInitializedboolean
  • passwordUpdatedAtstring (date-time)
  • personobject

    The users personal information, e.g. first name.

    • firstNamestringrequired

      The users first name

    • lastNamestringrequired

      The users last name

    • titlestring (einer von: mr, ms, other)
  • userIdstring
Content-Type: application/json

{
"email": "a.lovelace@example.com",
"mfaDetails": {
"mfaConfirmed": true,
"mfaInitialized": true
},
"passwordUpdatedAt": "1985-10-26T01:21:00.000Z",
"person": {
"firstName": "Ada",
"lastName": "Lovelace",
"title": "mr"
},
"userId": "string"
}
{
"properties": {
"email": {
"example": "a.lovelace@example.com",
"format": "email",
"type": "string"
},
"mfaDetails": {
"description": "The users mfa details.",
"properties": {
"mfaConfirmed": {
"type": "boolean"
},
"mfaInitialized": {
"type": "boolean"
}
},
"type": "object"
},
"passwordUpdatedAt": {
"format": "date-time",
"type": "string"
},
"person": {
"type": "object",
"description": "The users personal information, e.g. first name.",
"properties": {
"firstName": {
"type": "string",
"description": "The users first name",
"example": "Ada"
},
"lastName": {
"type": "string",
"description": "The users last name",
"example": "Lovelace"
},
"title": {
"type": "string",
"enum": [
"mr",
"ms",
"other"
]
}
},
"required": [
"lastName",
"firstName"
]
},
"userId": {
"type": "string"
}
},
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-d '{}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/self/personal-information
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.user.deprecatedUserGetOwnAccount({
"data": {}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\User\DeprecatedUserGetOwnAccount\DeprecatedUserGetOwnAccountRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\DeprecatedUserGetOwnAccount\DeprecatedUserGetOwnAccountRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// DeprecatedUserGetOwnAccountRequestBody to learn how to construct a valid instance
$body = new DeprecatedUserGetOwnAccountRequestBody(/* TODO: ... */);

$request = (new DeprecatedUserGetOwnAccountRequest(
body: $body
));
$response = $client->user()->deprecatedUserGetOwnAccount($request);

var_dump($response->getBody();

Auf dieser Seite