# getResponseCookies

Learn how to get the session cookies to write to the response.

This method provides the session cookies to write to the response, reflecting the saved client ID and user token.

Use it when integrating with a framework that manages the `Set-Cookie` headers itself, instead of [`emit`](emit) for plain PHP scripts.

## Signature

This method has the following signature:

```php
public function getResponseCookies(): array
```

This method returns a list of two [`Cookie`](/reference/sdk/php/api/storage/cookie) objects to set on the response: the client ID cookie and the user token cookie.

## Example

Here is a basic example of how to use this method:

```php
<?php
use Croct\Plug\CookieStorage;

$storage = CookieStorage::fromGlobals();
$cookies = $storage->getResponseCookies();
```
