> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Get SIP credential GET https://%7BYour_Space_Name%7D.signalwire.com/api/fabric/resources/sip_endpoints/{id} Retrieves one project-scoped SIP Credential by resource ID so you can inspect how its device registers and places calls through SignalWire. Use [List SIP credentials](/docs/apis/rest/sip-credentials/list-sip-credentials) to discover IDs, or the Subscriber endpoint for a credential owned by one Subscriber. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space). Reference: https://signalwire.com/docs/apis/rest/sip-credentials/get-sip-credential ## Authentication - `Authorization` header (basic auth, required) — SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ``` ## Request ### Path parameters - `id` (string, required) — Unique ID of the SIP endpoint. ## Response ### 200 The request has succeeded. - `type` (string, required) — A string representation of the type of object this record is. - `id` (string, required) — The unique identifier of the SIP endpoint. - `username` (string, required) — The username for the SIP endpoint. - `caller_id` (string, required, nullable) — Friendly Caller ID used as the CNAM when dialing a phone number or the From when dialing another SIP Endpoint. - `send_as` (string, required) — When dialing a PSTN phone number, you must send it From a number you have purchased or verified. send_as indicates which number this endpoint has set as its origination. random indicates it will randomly choose a purchased or verified number from within the project. - `ciphers` (list of string, required) — A list of encryption ciphers this endpoint will support. - `codecs` (list of string, required) — A list of codecs this endpoint will support. - `encryption` (enum, required) — Whether connections to this endpoint require encryption or if encryption is optional. - Allowed values: `default`, `required`, `optional` - `call_handler` (enum, required, nullable) — What type of handler you want to run on inbound calls. - Allowed values: `relay_context`, `relay_topic`, `relay_application`, `relay_connector`, `relay_script`, `laml_webhooks`, `laml_application`, `dialogflow`, `video_room`, `call_flow`, `ai_agent` - `calling_handler_resource_id` (string, required, nullable) — The unique identifier of the calling handler resource. - `call_request_url` (string, required, nullable) — A string representing the LaML URL to access when a call is received. This is only used (and required) when call_handler is set to laml_webhooks. - `call_request_method` (enum, required, nullable) — A string representing the HTTP method to use with call_request_url. Valid values are GET and POST. - Allowed values: `GET`, `POST` - `call_fallback_url` (string, required, nullable) — A string representing the LaML URL to access when the call to call_request_url fails. This is only used (and required) when call_handler is set to laml_webhooks. - `call_fallback_method` (enum, required, nullable) — A string representing the HTTP method to use with call_fallback_url. Valid values are GET and POST. - Allowed values: `GET`, `POST` - `call_status_callback_url` (string, required, nullable) — A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to laml_webhooks. - `call_status_callback_method` (enum, required, nullable) — A string representing the HTTP method to use with call_status_callback_url. Valid values are GET and POST. - Allowed values: `GET`, `POST` - `call_laml_application_id` (string, required, nullable) — A string representing the ID of the LaML application to forward incoming calls to. This is only used (and required) when call_handler is set to laml_application. - `call_dialogflow_agent_id` (string, required, nullable) — A string representing the ID of the Dialogflow agent to forward incoming calls to. This is only used (and required) when call_handler is set to dialogflow. - `call_relay_topic` (string, required, nullable) — A string representing the Relay topic to forward incoming calls to. This is only used (and required) when call_handler is set to relay_topic. - `call_relay_topic_status_callback_url` (string, required, nullable) — A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_topic. - `call_relay_context` (string, required, nullable) — A string representing the Relay context to forward incoming calls to. This is only used (and required) when call_handler is set to relay_context. - `call_relay_context_status_callback_url` (string, required, nullable) — A string representing a URL to send status change messages to. This is only used (and required) when call_handler is set to relay_context. - `call_relay_application` (string, required, nullable) — A string representing the Relay application to forward incoming calls to. This is only used (and required) when call_handler is set to relay_application. - `call_video_room_id` (string, required, nullable) — A string representing the ID of the Video Room to forward incoming calls to. This is only used (and required) when call_handler is set to video_room. - `call_relay_script_url` (string, required, nullable) — A string representing a URL of a SWML script to respond to incoming calls. This is only used (and required) when call_handler is set to relay_script. ## Errors ### 401 Unauthorized Error Access is unauthorized. - `error` (enum, required) - Allowed values: `Unauthorized` ### 404 Not Found Error The server cannot find the requested resource. - `error` (enum, required) - Allowed values: `Not Found` ### 500 Internal Server Error An internal server error occurred. - `error` (enum, required) - Allowed values: `Internal Server Error` ## Examples **Response** ```json { "type": "sip_endpoint", "id": "67075301-69b2-4fc3-8a2c-c95a69a5665e", "username": "c3p0", "caller_id": "C-3P0", "send_as": "random", "ciphers": [ "string" ], "codecs": [ "string" ], "encryption": "required", "call_handler": "ai_agent", "calling_handler_resource_id": "fe4093d9-58c2-4931-b4b9-5679f82652c6", "call_request_url": "string", "call_request_method": "POST", "call_fallback_url": "string", "call_fallback_method": "POST", "call_status_callback_url": "string", "call_status_callback_method": "POST", "call_laml_application_id": "string", "call_dialogflow_agent_id": "string", "call_relay_topic": "office", "call_relay_topic_status_callback_url": "https://myapplication/handle_relay_callbacks", "call_relay_context": "string", "call_relay_context_status_callback_url": "https://myapplication/handle_relay_callbacks", "call_relay_application": "string", "call_video_room_id": "string", "call_relay_script_url": "https://dev.signalwire.com/relay-bins/f9d13f68-f71e-4042-95bb-b07b9e2f2f92" } ``` **SDK Code** ```python import requests url = "https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id'; const credentials = btoa(":"); const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id" req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id") .basicAuth("", "") .asString(); ``` ```php request('GET', 'https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/fabric/resources/sip_endpoints/id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```