All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
getAccessTokenWithoutWordPress | POST /api/Customers/login | Log in a user on MyYoast. |
loginUser | POST /api/Customers/login-user | |
logoutUser | POST /api/Customers/logout-user | Logout the user on Yoast.com. |
logoutWithoutWordPress | GET /logout | |
yoastComCallback | GET /auth/yoast/callback | |
yoastComLogin | GET /auth/yoast |
\Yoast\MyYoastApiClient\Model\AccessTokenResponse getAccessTokenWithoutWordPress($body)
Log in a user on MyYoast.
This is only done for internal user accounts which, in contrast to user accounts, do have set passwords in MyYoast.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\LoginDto(); // \Yoast\MyYoastApiClient\Model\LoginDto |
try {
$result = $apiInstance->getAccessTokenWithoutWordPress($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->getAccessTokenWithoutWordPress: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\LoginDto |
\Yoast\MyYoastApiClient\Model\AccessTokenResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
loginUser($body)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$body = new \Yoast\MyYoastApiClient\Model\LoginUserDto(); // \Yoast\MyYoastApiClient\Model\LoginUserDto |
try {
$apiInstance->loginUser($body);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->loginUser: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\LoginUserDto |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
logoutUser()
Logout the user on Yoast.com.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
try {
$apiInstance->logoutUser();
} catch (Exception $e) {
echo 'Exception when calling AuthApi->logoutUser: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
logoutWithoutWordPress()
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->logoutWithoutWordPress();
} catch (Exception $e) {
echo 'Exception when calling AuthApi->logoutWithoutWordPress: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
yoastComCallback()
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
try {
$apiInstance->yoastComCallback();
} catch (Exception $e) {
echo 'Exception when calling AuthApi->yoastComCallback: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
yoastComLogin()
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Yoast\MyYoastApiClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
try {
$apiInstance->yoastComLogin();
} catch (Exception $e) {
echo 'Exception when calling AuthApi->yoastComLogin: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]