# Connecting to server-to-server APIs (fe. Sandbox)

### Environments

We have three environments available for our partners.

- Sandbox - this is shared environment, available as demonstration. You can get access before signing a deal with us - [<span style="color: #000000;">Contact Sales</span>](mailto:sales@verestro.com)<span style="color: #000000;"> </span>to get access.
- Beta - This is environment you're going to use during integration with our services.
- Production - This is live environment.

### Authorization - create Your certificate

Our APIs are secured with Mutual TLS Authentication. You will need certificate signed by us in order to connect. To get a certificate please send us an Certificate Signing Request (CSR). We will sign it and return a valid certificate in a response.

CSR should have following structure:

#### For Sandbox

##### Example CSR generation command for Sandbox

<p class="callout info">**Remember to replace parameters and file names with your own data.** Commas cannot be used in parameters.  
Minimum key length is RSA 2048.</p>

```shell
openssl req -new -newkey rsa:4096 -keyout companyName.key -out companyName.csr -nodes -subj '/C=US/ST=Florida/L=Miami/O=SomeCompany/OU=main/CN=V-SBX-companyName-applicationName/emailAddress=example@user.com'
```


<table id="bkmrk-field-example-value-"><thead><tr><th>Field</th><th>Example value</th></tr></thead><tbody><tr><td>Common Name (CN)</td><td>`V-SBX-Companyname-ApplicationName`

Company Name should be replaced with name of your company. First letter up case, all other letters lower case. No spaces and special characters.

Application Name should be replaced with name of application you're developing.

</td></tr><tr><td>Organization (O)</td><td>Name of your company.  
</td></tr><tr><td>Organizational Unit (OU)</td><td>`main` - do not enter any other value.   
</td></tr><tr><td>Locality (L)  
</td><td>City where your organization is located.  
</td></tr><tr><td>State/County/Region (ST)</td><td>State/County where your organization is located.  
</td></tr><tr><td>Country (C)</td><td>Two-letter country code where organization is located (ISO 3166-1 alpha-2).  
</td></tr><tr><td>Email Address</td><td>Email to be contacted in case of forced renewal.</td></tr></tbody></table>

#### For Beta/Production

You will need separate certificates for Beta and Production environments, however they can be generated in exactly the same way.

<table id="bkmrk-field-example-value--0"><thead><tr><th>Field</th><th>Example value</th></tr></thead><tbody><tr><td>Common Name (CN)</td><td>`V-Companyname-ApplicationName`

Company Name should be replaced with name of your company. First letter up case, all other letters lower case. No spaces and special characters.

Application Name should be replaced with name of application you're developing.

**Do not use different CNs for Beta &amp; Prod**

</td></tr><tr><td>Organization (O)</td><td>Name of your company.  
</td></tr><tr><td>Organizational Unit (OU)</td><td>`main` - do not enter any other value.   
</td></tr><tr><td>Locality (L)</td><td>City where your organization is located.</td></tr><tr><td>State/County/Region (ST)</td><td>State/County where your organization is located.  
</td></tr><tr><td>Country (C)</td><td>Two-letter country code where organization is located (ISO 3166-1 alpha-2).  
</td></tr><tr><td>Email Address</td><td>Email to be contacted in case of forced renewal.  
</td></tr></tbody></table>

##### Example CSR generation command for Beta and Production 

<p class="callout info">**Remember to replace parameters and file names with your own data.** Commas cannot be used in parameters.  
Minimum key length is RSA 2048.</p>

```shell
openssl req -new -newkey rsa:4096 -keyout companyName.key -out companyName.csr -nodes -subj '/C=US/ST=Florida/L=Miami/O=SomeCompany/OU=main/CN=V-companyName-applicationName/emailAddress=example@user.com'
```

---