# `Twilio.Iam.V1.GetApiKeysService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/iam/v1/get_api_keys_service.ex#L2)

API keys

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Create a new Signing Key for the account making the request.

Operation: `CreateNewKey` | Tags: IamV1NewApiKey

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `AccountSid` | string | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `KeyType` | string | The `KeyType` form parameter is used to specify the type of key you want to create.  **Default Behavior**: If `KeyType` is not specified, the API will generate a standard key.  **Restricted Key**: If `KeyType` is set to `restricted`, the API will create a new restricted key. In this case, a policy object is required to define the permissions. Values: `restricted` |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Policy` | string | The `Policy` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Delete a specific Key.

Operation: `DeleteKey` | Tags: IamV1ApiKey

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Fetch a specific Key.

Operation: `FetchKey` | Tags: IamV1ApiKey

# `list`

```elixir
@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Retrieve a list of all Keys for a account.

Operation: `ListGetKeys` | Tags: IamV1GetApiKeys

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `AccountSid` | string | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()
```

Stream: Retrieve a list of all Keys for a account. (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Iam.V1.GetApiKeys.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Update a specific Key.

Operation: `UpdateKey` | Tags: IamV1ApiKey

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `Policy` | string | The `Policy` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
