---
title: "Initiate Site Oauth"
method: GET
path: "/entities/site/{site_id}/oauth/{provider}/initiate"
tags: ["3. Sites"]
---

# Initiate Site Oauth

`GET /entities/site/{site_id}/oauth/{provider}/initiate`

## Request

- Base URL: `https://api-sandbox.axle.energy`
- URL: `https://api-sandbox.axle.energy/entities/site/{site_id}/oauth/{provider}/initiate`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token-form`

Initiates OAuth flow by returning the provider's authorisation URL for the client to redirect to

## Path parameters

- `site_id` string, uuid, required
- `provider` string, required

## Response `200`

Returns OAuth authorisation URL

- OAuthInitiateResponse: Response for initiating OAuth flow with a third party service (e.g. FoxESS)
  - `authorization_url` string, required: Third party URL to redirect the user to for OAuth authorisation

## Other responses

- `400`: Unsupported OAuth provider or not configured
- `422`: Validation Error
- `500`: Internal server error

## Changes

- **2026-11-03** `b0b07b1dbf12`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/axle/apis/axle-api-docs/changes/entities/site/:site_id/oauth/:provider/initiate/get.md)

---

[API](https://skmtc.dev/axle/apis/axle-api-docs.md) - [All operations](https://skmtc.dev/axle/apis/axle-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/axle/apis/axle-api-docs/revisions/b0b07b1dbf12?raw)
