# Return all Configuration objects

> **GET** `https://api.us.nylas.com/v3/grants/{grant_id}/scheduling/configurations`

Source: https://developer.nylas.com/docs/reference/api/configurations/get-configurations/

Returns all Configuration objects.

**Authentication:** NYLAS_API_KEY

## Parameters

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | No | The maximum number of objects to return. See [Pagination](/docs/reference/api/#pagination) for more information. |
| `page_token` | string | No | An identifier that specifies which page of data to return. You can get this value from the `next_cursor` response field. See [Pagination](/docs/reference/api/#pagination) for more information. |

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `grant_id` | string | Yes | ID of the grant to access. You can also use the email address associated with the grant, or use `/me/` to refer to the grant associated with an access token. |

## Responses

### 200 - Configuration objects returned

- `request_id` (string) - The request ID.
- `data` (array)
- `next_cursor` (string,null) - A cursor pointing to the next page of results for the request.

### 400 - Bad Request

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 401 - Unauthorized

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.
  - `provider_error` (object) - The error from the provider.

### 429 - Rate Limit

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

### 504 - Provider Failure

- `request_id` (string) - The request ID.
- `error` (object) - The response error object.
  - `type` (string) - The error type.
  - `message` (string) - The error message.

## Code samples

### cURL

```bash
curl --compressed --request GET \
  --url "https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/scheduling/configurations" \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <NYLAS_API_KEY>' \
  --header 'Content-Type: application/json'
```

### Node.js SDK

```javascript
import Nylas from "nylas";

const nylas = new Nylas({
  apiKey: "<NYLAS_API_KEY>",
  apiUri: "<NYLAS_API_URI>",
});

async function listConfigurations() {
  try {
    const configurations = await nylas.scheduler.configurations.list({
      identifier: "<NYLAS_GRANT_ID>",
    });

    console.log("Configurations:", configurations);
  } catch (error) {
    console.error("Error listing configurations:", error);
  }
}

listConfigurations();

```

### Python SDK

```python
from nylas import Client

nylas = Client(
    "<NYLAS_API_KEY>",
    "<NYLAS_API_URI>",
)

configurations = nylas.scheduler.configurations.list(
    identifier="<NYLAS_GRANT_ID>",
    query_params={
        "limit": 50,
    },
)

print("Configurations:", configurations)

```

### Ruby SDK

```ruby
# Load gems
require 'nylas'

# Initialize Nylas client
nylas = Nylas::Client.new(
  api_key: "<NYLAS_API_KEY>"
)

# Get a list of configurations
configurations, _request_ids = nylas.scheduler.configurations.list(identifier: "<NYLAS_GRANT_ID>")

# Loop the configurations

configurations.each {|configuration|
	puts("ID: #{configuration[:id]} | Slug: #{configuration[:slug]}")
}
```

### Java SDK

```java
import com.nylas.NylasClient;
import com.nylas.models.Configuration;
import com.nylas.models.ListResponse;
import com.nylas.models.NylasApiError;
import com.nylas.models.NylasSdkTimeoutError;

public class ListConfigurations {
  public static void main(String[] args) throws NylasSdkTimeoutError, NylasApiError {
    NylasClient nylas = new NylasClient.Builder("<NYLAS_API_KEY>").build();

    ListResponse<Configuration> configurations = nylas.scheduler().configurations()
        .list("<NYLAS_GRANT_ID>");

    System.out.println("Configurations: " + configurations.getData());
  }
}

```

### Kotlin SDK

```kotlin
import com.nylas.NylasClient

fun main() {
  val nylas = NylasClient.Builder("<NYLAS_API_KEY>").build()

  val configurations = nylas.scheduler().configurations().list("<NYLAS_GRANT_ID>")

  println("Configurations: ${configurations.data}")
}

```
