# SIP Credential Resource

The **Credential** resource stores usernames and password information.

## Username and Password

Each `Username` requires a corresponding password that meets the requirements in the `Password` parameter's description.

We don't store the passwords you provide in the credential records as cleartext. Instead, they are MD5 hashed in accordance with the digest authentication specification.

## SIP Credential properties

```json
{"type":"object","refName":"api.v2010.account.sip.sip_credential_list.sip_credential","modelName":"api_v2010_account_sip_sip_credential_list_sip_credential","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CR[0-9a-fA-F]{32}$","nullable":true,"description":"A 34 character string that uniquely identifies this resource."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The unique id of the Account that is responsible for this resource."},"credential_list_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$","nullable":true,"description":"The unique id that identifies the credential list that includes this credential."},"username":{"type":"string","nullable":true,"description":"The username for this credential.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"date_created":{"type":"string","format":"date-time-rfc-2822","nullable":true,"description":"The date that this resource was created, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format."},"date_updated":{"type":"string","format":"date-time-rfc-2822","nullable":true,"description":"The date that this resource was last updated, given as GMT in [RFC 2822](https://www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format."},"uri":{"type":"string","nullable":true,"description":"The URI for this resource, relative to `https://api.twilio.com`"}}}
```

## Create a SIP Credential resource

`POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The unique id of the Account that is responsible for this resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"CredentialListSid","in":"path","description":"The unique id that identifies the credential list to include the created credential.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateSipCredentialRequest","required":["Username","Password"],"properties":{"Username":{"type":"string","description":"The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}},"Password":{"type":"string","description":"The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)"}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"Password\": \"password\",\n  \"Username\": \"username\"\n}","meta":"","code":"{\n  \"Password\": \"password\",\n  \"Username\": \"username\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"Password\"","#7EE787"],[":","#C9D1D9"]," ",["\"password\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Username\"","#7EE787"],[":","#C9D1D9"]," ",["\"username\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Create a SIP Credential resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createSipCredential() {
  const credential = await client.sip
    .credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials.create({
      password: "password",
      username: "username",
    });

  console.log(credential.sid);
}

createSipCredential();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

credential = client.sip.credential_lists(
    "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).credentials.create(username="username", password="password")

print(credential.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.CredentialList;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var credential = await CredentialResource.CreateAsync(
            username: "username",
            password: "password",
            pathCredentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(credential.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Credential credential =
            Credential.creator("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "username", "password").create();

        System.out.println(credential.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.CreateSipCredentialParams{}
	params.SetUsername("username")
	params.SetPassword("password")

	resp, err := client.Api.CreateSipCredential("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$credential = $twilio->sip
    ->credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->credentials->create(
        "username", // Username
        "password" // Password
    );

print $credential->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

credential = @client
             .api
             .v2010
             .sip
             .credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
             .credentials
             .create(
               username: 'username',
               password: 'password'
             )

puts credential.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:sip:credential-lists:credentials:create \
   --credential-list-sid CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --username username \
   --password password
```

```bash
curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json" \
--data-urlencode "Username=username" \
--data-urlencode "Password=password" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
  "date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
  "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "username": "username"
}
```

## Fetch a SIP Credential resource

`GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The unique id of the Account that is responsible for this resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"CredentialListSid","in":"path","description":"The unique id that identifies the credential list that contains the desired credential.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The unique id that identifies the resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CR[0-9a-fA-F]{32}$"},"required":true}]
```

Fetch a SIP Credential resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchSipCredential() {
  const credential = await client.sip
    .credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch();

  console.log(credential.sid);
}

fetchSipCredential();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

credential = (
    client.sip.credential_lists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch()
)

print(credential.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.CredentialList;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var credential = await CredentialResource.FetchAsync(
            pathCredentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(credential.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Credential credential =
            Credential.fetcher("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(credential.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.FetchSipCredentialParams{}

	resp, err := client.Api.FetchSipCredential("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		"CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$credential = $twilio->sip
    ->credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

print $credential->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

credential = @client
             .api
             .v2010
             .sip
             .credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
             .credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
             .fetch

puts credential.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:sip:credential-lists:credentials:fetch \
   --credential-list-sid CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --sid CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
  "date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
  "sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "username": "1440013725.28"
}
```

## Read multiple SIP Credential resources

`GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The unique id of the Account that is responsible for this resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"CredentialListSid","in":"path","description":"The unique id that identifies the credential list that contains the desired credentials.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

Read multiple SIP Credential resources

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listSipCredential() {
  const credentials = await client.sip
    .credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials.list({ limit: 20 });

  credentials.forEach((c) => console.log(c.sid));
}

listSipCredential();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

credentials = client.sip.credential_lists(
    "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).credentials.list(limit=20)

for record in credentials:
    print(record.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.CredentialList;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var credentials = await CredentialResource.ReadAsync(
            pathCredentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", limit: 20);

        foreach (var record in credentials) {
            Console.WriteLine(record.Sid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Credential> credentials = Credential.reader("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").limit(20).read();

        for (Credential record : credentials) {
            System.out.println(record.getSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.ListSipCredentialParams{}
	params.SetLimit(20)

	resp, err := client.Api.ListSipCredential("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].Sid != nil {
				fmt.Println(*resp[record].Sid)
			} else {
				fmt.Println(resp[record].Sid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$credentials = $twilio->sip
    ->credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->credentials->read(20);

foreach ($credentials as $record) {
    print $record->sid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

credentials = @client
              .api
              .v2010
              .sip
              .credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
              .credentials
              .list(limit: 20)

credentials.each do |record|
   puts record.sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:sip:credential-lists:credentials:list \
   --credential-list-sid CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials.json?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "credentials": [
    {
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "credential_list_sid": "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
      "date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
      "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
      "username": "1440013725.28"
    }
  ],
  "end": 0,
  "first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials.json?PageSize=50&Page=0",
  "next_page_uri": null,
  "page": 0,
  "page_size": 50,
  "previous_page_uri": null,
  "start": 0,
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials.json?PageSize=50&Page=0"
}
```

## Update a SIP Credential resource

`POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json`

The update action is used to update a user's password.

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The unique id of the Account that is responsible for this resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"CredentialListSid","in":"path","description":"The unique id that identifies the credential list that includes this credential.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The unique id that identifies the resource to update.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CR[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"UpdateSipCredentialRequest","properties":{"Password":{"type":"string","description":"The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)"}}},"examples":{"update":{"value":{"lang":"json","value":"{\n  \"Password\": \"password\"\n}","meta":"","code":"{\n  \"Password\": \"password\"\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"Password\"","#7EE787"],[":","#C9D1D9"]," ",["\"password\"","#A5D6FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Update a SIP Credential resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function updateSipCredential() {
  const credential = await client.sip
    .credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .update({ password: "password" });

  console.log(credential.sid);
}

updateSipCredential();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

sip_credential = (
    client.sip.credential_lists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .update(password="password")
)

print(sip_credential.sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.CredentialList;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var credential = await CredentialResource.UpdateAsync(
            password: "password",
            pathCredentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(credential.Sid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Credential credential =
            Credential.updater("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                .setPassword("password")
                .update();

        System.out.println(credential.getSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.UpdateSipCredentialParams{}
	params.SetPassword("password")

	resp, err := client.Api.UpdateSipCredential("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		"CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Sid != nil {
			fmt.Println(*resp.Sid)
		} else {
			fmt.Println(resp.Sid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$sip_credential = $twilio->sip
    ->credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->update(["password" => "password"]);

print $sip_credential->sid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

credential = @client
             .api
             .v2010
             .sip
             .credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
             .credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
             .update(password: 'password')

puts credential.sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:sip:credential-lists:credentials:update \
   --credential-list-sid CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --sid CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --password password
```

```bash
curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json" \
--data-urlencode "Password=password" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "credential_list_sid": "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "date_created": "Wed, 19 Aug 2015 19:48:45 +0000",
  "date_updated": "Wed, 19 Aug 2015 19:48:45 +0000",
  "sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/CredentialLists/CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
  "username": "username"
}
```

## Delete a SIP Credential resource

`DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/CredentialLists/{CredentialListSid}/Credentials/{Sid}.json`

### Path parameters

```json
[{"name":"AccountSid","in":"path","description":"The unique id of the Account that is responsible for this resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$"},"required":true},{"name":"CredentialListSid","in":"path","description":"The unique id that identifies the credential list that contains the desired credentials.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CL[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The unique id that identifies the resource to delete.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^CR[0-9a-fA-F]{32}$"},"required":true}]
```

Delete a SIP Credential resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deleteSipCredential() {
  await client.sip
    .credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .remove();
}

deleteSipCredential();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.sip.credential_lists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").credentials(
    "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Api.V2010.Account.Sip.CredentialList;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await CredentialResource.DeleteAsync(
            pathCredentialListSid: "CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.sip.credentiallist.Credential;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Credential.deleter("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	api "github.com/twilio/twilio-go/rest/api/v2010"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &api.DeleteSipCredentialParams{}

	err := client.Api.DeleteSipCredential("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		"CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->sip
    ->credentialLists("CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->credentials("CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .api
  .v2010
  .sip
  .credential_lists('CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .credentials('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:core:sip:credential-lists:credentials:remove \
   --credential-list-sid CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --sid CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X DELETE "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SIP/CredentialLists/CLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Credentials/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
