Importer un numéro de téléphone (BYOT)
curl --request POST \
--url https://api.example.com/api/phone-numbers/importimport requests
url = "https://api.example.com/api/phone-numbers/import"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/phone-numbers/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/phone-numbers/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/phone-numbers/import"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/phone-numbers/import")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/phone-numbers/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyNuméros de téléphone
Importer un numéro de téléphone (BYOT)
Importer un numéro de téléphone Twilio existant
POST
/
api
/
phone-numbers
/
import
Importer un numéro de téléphone (BYOT)
curl --request POST \
--url https://api.example.com/api/phone-numbers/importimport requests
url = "https://api.example.com/api/phone-numbers/import"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/phone-numbers/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/phone-numbers/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/phone-numbers/import"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/phone-numbers/import")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/phone-numbers/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyRequête
curl -X POST https://app.orova.ai/api/phone-numbers/import \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "+1234567890",
"twilioAccountSid": "AC...",
"twilioAuthToken": "...",
"workspaceId": "WORKSPACE_ID"
}'
Paramètres
| Champ | Type | Requis | Description |
|---|---|---|---|
phoneNumber | string | Oui | Numéro Twilio à importer |
twilioAccountSid | string | Oui | SID du compte Twilio |
twilioAuthToken | string | Oui | Jeton d’authentification Twilio |
workspaceId | string | Oui | ID de l’espace de travail |
Réponse
{
"_id": "phone_id",
"number": "+1234567890",
"status": "active",
"type": "byot",
"workspaceId": "WORKSPACE_ID"
}
L’importation d’un numéro configure automatiquement les URL de webhook Twilio pour qu’elles pointent vers votre instance Orova.
Cette page vous a-t-elle été utile ?
⌘I

