# Getting Started

This guide explains the recommended steps for connecting to the UtilityCloud API.

Before using the API, the integration must be configured for the relevant UtilityCloud environment. Most integrations should start in staging, where authentication, access rights, payloads, and business flows can be verified before production access is used.

## Before you begin

Make sure you have:

- access to the relevant UtilityCloud tenant
- agreement on which environment to use
- an application registration in your own Entra ID tenant
- the required client ID available
- confirmation from UtilityCloud that the client ID has been configured

## Step 1: Request API access

Contact UtilityCloud support or your UtilityCloud contact person to request API access. The request should specify which tenant, environment, and integration scenario the access is needed for.

## Step 2: Register application clients

Create separate application clients for staging and production. This makes it easier to separate test traffic from production traffic and reduces the risk of using production credentials during development.

## Step 3: Receive environment access

UtilityCloud configures the provided client ID for the relevant environment and tenant. Do not send client secrets to UtilityCloud.

## Step 4: Get an access token

Use the OAuth 2.0 client credentials flow to request an access token from Entra ID. The token must be requested with the correct scope for the UtilityCloud environment.

## Step 5: Make your first API request

Call a simple read endpoint in the staging environment and include the access token in the Authorization header as a Bearer token.

## Next steps

After the first request is successful, continue with the relevant common workflow, such as creating a contract or retrieving invoices.
