> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Credentials

> List all credentials with their name and type using aliases and the Validio SDK.

## Overview

List all credentials, using an alias for a field in the query, and iterate over the result to print each credential's name and type.

## Steps

**1. Import the client**

Import the `Client` from `validio_sdk.client`.

**2. Write the request**

Write a `credentialsList` query. The query uses an alias to return the name of the type as `credentialType` instead of `__typename`. The alias isn't required; it's there to show how aliasing works.

**3. Execute the request**

Send the request. The response is under the same key as the name of the operation, `credentialsList`. The client is asynchronous, so you have to `await` the request.

**4. Iterate over the result**

Loop over all credentials and print the name of each credential and its type.

## Full code sample

```python title="Python" theme={null}
from validio_sdk.client import Client


async def example():
    client = Client()
    query = """
    query ListCredentials {
      credentialsList {
        credentialType: __typename
        name
      }
    }
    """

    result = await client.execute(query)
    credentials = result["credentialsList"]

    for credential in credentials:
        print(f'{credential["name"]} - {credential["credentialType"]}')
```
