Obtain a service token
POST/services/ {accessKeyId}/ actions/ authenticate/
v2
POST
servicetoken-authenticate-service
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{"secretAccessKey":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/services/string/actions/authenticate
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.misc.servicetokenAuthenticateService({
"accessKeyId": "string",
"data": {
"secretAccessKey": "string"
}
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Misc\ServicetokenAuthenticateService\ServicetokenAuthenticateServiceRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Misc\ServicetokenAuthenticateService\ServicetokenAuthenticateServiceRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// ServicetokenAuthenticateServiceRequestBody to learn how to construct a valid instance
$body = new ServicetokenAuthenticateServiceRequestBody(/* TODO: ... */);
$request = (new ServicetokenAuthenticateServiceRequest(
accessKeyId: "string",
body: $body
));
$response = $client->misc()->servicetokenAuthenticateService($request);
var_dump($response->getBody();