# SpacesAPI\Spaces Represents the connection to Digital Ocean spaces. The entry point for managing spaces. Instantiate your connection with `new \SpacesAPI\Spaces("access-key", "secret-key", "region")` Obtain your access and secret keys from the [DigitalOcean Applications & API dashboard](https://cloud.digitalocean.com/account/api/tokens) ## Methods | Name | Description | |------|-------------| |[__construct](#spaces__construct)|Initialise the API| |[create](#spacescreate)|Create a new space| |[list](#spaceslist)|List all your spaces| |[space](#spacesspace)|Use an existing space| ### Spaces::__construct **Description** ```php public __construct (string $accessKey, string $secretKey, string $region = "ams3", string $host = "digitaloceanspaces.com) ``` Initialise the API **Parameters** * `(string) $accessKey` : Digital Ocean API access key * `(string) $secretKey` : Digital Ocean API secret key * `(string) $region` : Region, defaults to `ams3` * `(string) $host` : API endpoint, defaults to `digitaloceanspaces.com` **Return Values** `void` **Throws Exceptions** `\SpacesAPI\Exceptions\AuthenticationException` > Authentication failed