---
updatedAt: 2025-08-27T16:00:03.000Z
agentTools:
  projectIndex: https://docs.moneyhubenterprise.com/v2.5/llms.txt
---

# Retrieve an authorisation token

Requires **Basic** auth header to be sent with the **client-id** & **client-secret** base64 encoded

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "Swagger 2.0 docs for the authentication/authorization Moneyhub API",
    "title": "Moneyhub Identity Service",
    "version": "2.0.0"
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "paths": {
    "/oidc/token": {
      "post": {
        "summary": "Retrieve an authorisation token",
        "description": "Requires **Basic** auth header to be sent with the **client-id** & **client-secret** base64 encoded",
        "security": [
          {
            "Basic": []
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "description": "Type of grant token required",
                    "type": "string",
                    "enum": [
                      "client_credentials",
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "scope": {
                    "description": "The required scopes",
                    "type": "string"
                  },
                  "sub": {
                    "description": "The user-id of the specific user",
                    "type": "string"
                  },
                  "code": {
                    "description": "The authorization code for use when doing a client secret basic auth",
                    "type": "string"
                  },
                  "redirect_uri": {
                    "description": "The redirect URI",
                    "type": "string"
                  },
                  "client_id": {
                    "description": "The client id for use when doing a private key JWT auth",
                    "type": "string"
                  },
                  "client_assertion": {
                    "description": "For use when doing a private key JWT auth",
                    "type": "string"
                  },
                  "client_assertion_type": {
                    "description": "For use when doing a private key JWT auth",
                    "type": "string"
                  }
                },
                "required": [
                  "grant_type",
                  "scope"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A successful token retrieval response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "403": {
            "description": "Unsuccessful Response - Invalid scopes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "auth"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://identity.moneyhub.co.uk"
    }
  ],
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "Basic": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "Error": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "The error code",
            "type": "string"
          },
          "message": {
            "description": "The error message",
            "type": "string"
          },
          "correlationId": {
            "description": "Id that identifies the request and can be used to ask for more details related to the error",
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "Token": {
        "additionalProperties": false,
        "type": "object",
        "properties": {
          "access_token": {
            "description": "Access Token",
            "example": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlRxVk1laV9XdUtqZW5HWlJUbnJpeUxXRnZuS2tzTjNvLWFuWXBqS0JEbVUifQ",
            "type": "string"
          },
          "expires_at": {
            "description": "Token Expiry",
            "example": 1616090946,
            "type": "integer"
          },
          "id_token": {
            "description": "The id token can be decoded to get more information about the user and the connection or payment performed",
            "example": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlRxVk1laV9XdUtqZW5HWlJUbnJpeUxXRnZuS2tzTjNvLWFuWXBqS0JEbVUifQ",
            "type": "string"
          },
          "scope": {
            "description": "The granted scopes",
            "example": "id:1ffe704d39629a929c8e293880fb449a openid",
            "type": "string"
          },
          "token_type": {
            "description": "Type of token granted",
            "example": "Bearer",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_at",
          "scope",
          "token_type"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```