# Sylius\SecurityApi



All URIs are relative to http://localhost, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**postAdministratorCredentialsItem()**](SecurityApi.md#postAdministratorCredentialsItem) | **POST** /api/v2/admin/administrators/token | Retrieves the JWT token. |
| [**postCustomerCredentialsItem()**](SecurityApi.md#postCustomerCredentialsItem) | **POST** /api/v2/shop/customers/token | Retrieves the JWT token. |


## `postAdministratorCredentialsItem()`

```php
postAdministratorCredentialsItem($administrator_admin_administrator_token_create): \Sylius\Model\AdministratorAdminAdministratorTokenRead
```

Retrieves the JWT token.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\SecurityApi(
    // 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
);
$administrator_admin_administrator_token_create = new \Sylius\Model\AdministratorAdminAdministratorTokenCreate(); // \Sylius\Model\AdministratorAdminAdministratorTokenCreate | Retrieves the JWT token.

try {
    $result = $apiInstance->postAdministratorCredentialsItem($administrator_admin_administrator_token_create);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SecurityApi->postAdministratorCredentialsItem: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **administrator_admin_administrator_token_create** | [**\Sylius\Model\AdministratorAdminAdministratorTokenCreate**](../Model/AdministratorAdminAdministratorTokenCreate.md)| Retrieves the JWT token. | [optional] |

### Return type

[**\Sylius\Model\AdministratorAdminAdministratorTokenRead**](../Model/AdministratorAdminAdministratorTokenRead.md)

### Authorization

[JWT](../../README.md#JWT)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `postCustomerCredentialsItem()`

```php
postCustomerCredentialsItem($customer_shop_customer_token_create): \Sylius\Model\CustomerShopCustomerTokenRead
```

Retrieves the JWT token.

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: JWT
$config = Sylius\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Sylius\Api\SecurityApi(
    // 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
);
$customer_shop_customer_token_create = new \Sylius\Model\CustomerShopCustomerTokenCreate(); // \Sylius\Model\CustomerShopCustomerTokenCreate | Retrieves the JWT token.

try {
    $result = $apiInstance->postCustomerCredentialsItem($customer_shop_customer_token_create);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SecurityApi->postCustomerCredentialsItem: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_shop_customer_token_create** | [**\Sylius\Model\CustomerShopCustomerTokenCreate**](../Model/CustomerShopCustomerTokenCreate.md)| Retrieves the JWT token. | [optional] |

### Return type

[**\Sylius\Model\CustomerShopCustomerTokenRead**](../Model/CustomerShopCustomerTokenRead.md)

### Authorization

[JWT](../../README.md#JWT)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
