---
title: "Authorization REST API | Grafana Cloud documentation"
description: "Authorization REST API Note The documentation for this API is also available as an OpenAPI description. Validate a Grafana Cloud k6 API token and access to the stack GET /cloud/v6/auth"
---

# Authorization REST API

> Note
> 
> The documentation for this API is also available as an [OpenAPI description](https://editor-next.swagger.io/?url=https%3A%2F%2Fapi.k6.io%2Fcloud%2Fv6%2Fopenapi).

## Validate a Grafana Cloud k6 API token and access to the stack

`GET /cloud/v6/auth`

Validate a Grafana Cloud k6 Personal API token or Stack API token and access to the stack.

#### Request parameters

| Name          | Description                                      | In       | Required | Type     |
|---------------|--------------------------------------------------|----------|----------|----------|
| `X-Stack-Url` | The URL of the Grafana stack to authenticate to. | `header` | `true`   | `string` |

#### `200` response

OK.

##### Content types: `application/json`

`AuthenticationResponse` properties:

| Name                 | Description                                            | Required | Type      |
|----------------------|--------------------------------------------------------|----------|-----------|
| `default_project_id` | The ID of the default project in the stack.            | `true`   | `integer` |
| `stack_id`           | The ID of the Grafana stack matching the provided URL. | `true`   | `integer` |

##### OK example

```json
{
  "default_project_id": 67890,
  "stack_id": 12345
}
```

#### `401` response

Invalid token or authentication scheme.

##### Content types: `application/json`

`ErrorResponseApiModel` properties:

| Name    | Description | Required | Type            |
|---------|-------------|----------|-----------------|
| `error` |             | `true`   | `ErrorApiModel` |

Details of the error.

`ErrorApiModel` properties:

| Name      | Description                                                                                  | Required | Type               |
|-----------|----------------------------------------------------------------------------------------------|----------|--------------------|
| `code`    | Service-defined error code.                                                                  | `true`   | `string`           |
| `details` | Array of objects with more specific error information when applicable.                       | `false`  | `array` \| `null`  |
| `message` | Human-readable string describing the error.                                                  | `true`   | `string`           |
| `target`  | A string indicating the target of the error. For example, the name of the property in error. | `false`  | `string` \| `null` |

#### `403` response

The user does not have permission to perform this action.

##### Content types: `application/json`

`ErrorResponseApiModel` properties:

| Name    | Description | Required | Type            |
|---------|-------------|----------|-----------------|
| `error` |             | `true`   | `ErrorApiModel` |

Details of the error.

`ErrorApiModel` properties:

| Name      | Description                                                                                  | Required | Type               |
|-----------|----------------------------------------------------------------------------------------------|----------|--------------------|
| `code`    | Service-defined error code.                                                                  | `true`   | `string`           |
| `details` | Array of objects with more specific error information when applicable.                       | `false`  | `array` \| `null`  |
| `message` | Human-readable string describing the error.                                                  | `true`   | `string`           |
| `target`  | A string indicating the target of the error. For example, the name of the property in error. | `false`  | `string` \| `null` |

#### `500` response

Unexpected error.

##### Content types: `application/json`

`ErrorResponseApiModel` properties:

| Name    | Description | Required | Type            |
|---------|-------------|----------|-----------------|
| `error` |             | `true`   | `ErrorApiModel` |

Details of the error.

`ErrorApiModel` properties:

| Name      | Description                                                                                  | Required | Type               |
|-----------|----------------------------------------------------------------------------------------------|----------|--------------------|
| `code`    | Service-defined error code.                                                                  | `true`   | `string`           |
| `details` | Array of objects with more specific error information when applicable.                       | `false`  | `array` \| `null`  |
| `message` | Human-readable string describing the error.                                                  | `true`   | `string`           |
| `target`  | A string indicating the target of the error. For example, the name of the property in error. | `false`  | `string` \| `null` |
