# Creating a Service Account

To use server-to-server interactions, **you need to request the creation of a service account by contacting the project manager responsible for your company** and sending the following information: company name, application name, name, email, and phone number of the person responsible for the application within the company. Separate accounts must be created for the Testing and Production environments.&#x20;

Once these details are received, a service account will be created to authenticate your application, and we will send an email for you to generate the key pair for the account.&#x20;

A service account credential includes a unique account name, a company identifier (Tenant ID), and at least one key pair (public and private). After generating the keys, you will only receive the private key (file .key.pem), as well as the payload that should be used to create the JWT. This payload will have the following format:

<figure><img src="/files/FuwxP9TIY0cpV66DQ1QY" alt=""><figcaption></figcaption></figure>

If you need the public key to configure it in your system, please contact the project manager responsible for your account. It is also possible to generate a public key using the following openssl command:

```
openssl req -x509 -new -nodes -sha256 -days 720 \
-key fileName.key.pem -out fileName.cert.pem
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devcenter.unico.io/unico-idpay/en/integration/authentication/creating-a-service-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
