# parse

Learn how to create an API key from its serialized string.

This method creates an API key from its serialized string, in the form `identifier` or `identifier:privateKey`.

## Signature

This method has the following signature:

```php
public static function parse(string $apiKey): self
```

This method returns a new instance parsed from the given string.

## Example

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

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

$apiKey = ApiKey::parse('f47ac10b-58cc-4372-a567-0e02b2c3d479');
```

## Parameters

The following list describes the supported parameters:

- `apiKey`: `string`

  The serialized API key, in the form `identifier` or `identifier:privateKey`.
