Zum Hauptinhalt springen

Check token for validity

POST/v2/users/self/credentials/token
API-Version
v2
Request-Methode
POST
Operation-ID
deprecated-user-check-token

Request​

Responses​

Format
application/json
Beschreibung

Your token is valid.

  • idstring (uuid)required
  • publicTokenstringrequired
Content-Type: application/json

{
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"publicToken": "string"
}
{
"properties": {
"id": {
"format": "uuid",
"type": "string"
},
"publicToken": {
"type": "string"
}
},
"required": [
"id",
"publicToken"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/self/credentials/token
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.deprecatedUserCheckToken({
"data": {}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\User\DeprecatedUserCheckToken\DeprecatedUserCheckTokenRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\DeprecatedUserCheckToken\DeprecatedUserCheckTokenRequestBody;

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

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

$request = (new DeprecatedUserCheckTokenRequest(
body: $body
));
$response = $client->user()->deprecatedUserCheckToken($request);

var_dump($response->getBody();

Auf dieser Seite