API-Version
v2
Request-Methode
POST
Operation-ID
user-oauth-retrieve-access-token
Exchange an authorization code or refresh token for an access token according to RFC6749. A successful exchange also rotates the refresh token.
Request
Responses
Nutzungsbeispiele
$ curl \
--fail \
--location \
-X POST \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/oauth2/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.oauthRetrieveAccessToken({});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\User\OauthRetrieveAccessToken\OauthRetrieveAccessTokenRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new OauthRetrieveAccessTokenRequest());
$response = $client->user()->oauthRetrieveAccessToken($request);
var_dump($response->getBody();