importplivoclient=plivo.RestClient(auth_id="<auth_id>",auth_token="<auth_token>")# Unlink a short code from Powerpack
powerpack=client.powerpacks.get(uuid='<powerpack_uuid>')# Version 1
response=powerpack.remove_shortcode('<shortcode>')# Version 2
response=powerpack.numberpool.shortcodes.remove('<shortcode>')print(response)
require'rubygems'require'plivo'includePlivoincludePlivo::Exceptionsapi=RestClient.new("<auth_id>","<auth_token>")begin# Unlink a short code from Powerpackpowerpack=api.powerpacks.get('<powerpack_uuid>')# Version 1response=powerpack.remove_shortcode('<shortcode>')# Version 2response=powerpack.numberpool.shortcodes.remove('<shortcode>')puts(response)rescuePlivoRESTError=>eputs'Exception: '+e.messageend
1
2
3
4
5
6
7
8
9
10
11
12
13
letplivo=require('plivo');letclient=newplivo.Client('<auth_id>','<auth_token>');// Unlink a short code from Powerpackclient.powerpacks.get("<powerpack_uuid>").then(function(powerpack){returnpowerpack.remove_shortcode("<shortcode>")// return powerpack.number_pool.shortcodes.remove("<shortcode>") V2}).then(function(result){console.log(result)})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?phprequire'vendor/autoload.php';usePlivo\RestClient;$client=newRestClient("<auth_id>","<auth_token>");$client->client->setTimeout(40);// Unlink a short code from Powerpacktry{$powerpack=$client->powerpacks->get("<powerpack_uuid>");// Version 1$response=$powerpack->remove_shortcode('<shortcode>');// Version 2$response=$powerpack->number_pool->shortcodes->remove('shortcode_uuid');print_r($response);}catch(PlivoRestException$ex){print_r($ex);}
packagecom.plivo.api;importjava.io.IOException;importcom.plivo.api.Plivo;importcom.plivo.api.exceptions.PlivoRestException;importcom.plivo.api.models.powerpack.Powerpack;publicclassTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Unlink a short code from Powerpacktry{Powerpackpowerpack=Powerpack.getter("<powerpack_uuid>").get();// Version 1powerpack.remove_shortcode().shortcode("<shortcode>").delete();// Version 2powerpack.numberpool.shortcodes.remove().shortcode("<shortcode>").delete();}catch(PlivoRestException|IOExceptione){e.printStackTrace();}}}
usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacePlivoExamples{classProgram{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Unlink a short code from Powerpacktry{varpowerpack=api.Powerpacks.Get("<powerpack_uuid>");// Version 1varresponse=powerpack.Remove_Shortcode("<shortcode>");// Version 2varresponse=powerpack.numberpool.shortcodes.Remove("<shortcode>");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
packagemainimport("fmt"plivo"github.com/plivo/plivo-go/v7")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.ClientOptions{})iferr!=nil{fmt.Print("Error",err.Error())return}// Unlink a short code from Powerpackpowerpack,err:=client.Powerpack.Get("<powerpack_uuid>")iferr!=nil{fmt.Print("Error",err.Error())return}response,err:=powerpack.Remove_shortcode("<shortcode>")iferr!=nil{fmt.Print("Error",err.Error())return}fmt.Printf("Response: %#v\n",response)}
Example Request
1
2
3
4
5
6
7
8
9
10
11
importplivoclient=plivo.RestClient(auth_id="<auth_id>",auth_token="<auth_token>")# Unlink a short code from Powerpack
powerpack=client.powerpacks.get(uuid='<powerpack_uuid>')# Version 1
response=powerpack.remove_shortcode('<shortcode>')# Version 2
response=powerpack.numberpool.shortcodes.remove('<shortcode>')print(response)
require'rubygems'require'plivo'includePlivoincludePlivo::Exceptionsapi=RestClient.new("<auth_id>","<auth_token>")begin# Unlink a short code from Powerpackpowerpack=api.powerpacks.get('<powerpack_uuid>')# Version 1response=powerpack.remove_shortcode('<shortcode>')# Version 2response=powerpack.numberpool.shortcodes.remove('<shortcode>')puts(response)rescuePlivoRESTError=>eputs'Exception: '+e.messageend
1
2
3
4
5
6
7
8
9
10
11
12
13
letplivo=require('plivo');letclient=newplivo.Client('<auth_id>','<auth_token>');// Unlink a short code from Powerpackclient.powerpacks.get("<powerpack_uuid>").then(function(powerpack){returnpowerpack.remove_shortcode("<shortcode>")// return powerpack.number_pool.shortcodes.remove("<shortcode>") V2}).then(function(result){console.log(result)})
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?phprequire'vendor/autoload.php';usePlivo\RestClient;$client=newRestClient("<auth_id>","<auth_token>");$client->client->setTimeout(40);// Unlink a short code from Powerpacktry{$powerpack=$client->powerpacks->get("<powerpack_uuid>");// Version 1$response=$powerpack->remove_shortcode('<shortcode>');// Version 2$response=$powerpack->number_pool->shortcodes->remove('shortcode_uuid');print_r($response);}catch(PlivoRestException$ex){print_r($ex);}
packagecom.plivo.api;importjava.io.IOException;importcom.plivo.api.Plivo;importcom.plivo.api.exceptions.PlivoRestException;importcom.plivo.api.models.powerpack.Powerpack;publicclassTest{publicstaticvoidmain(String[]args){Plivo.init("<auth_id>","<auth_token>");// Unlink a short code from Powerpacktry{Powerpackpowerpack=Powerpack.getter("<powerpack_uuid>").get();// Version 1powerpack.remove_shortcode().shortcode("<shortcode>").delete();// Version 2powerpack.numberpool.shortcodes.remove().shortcode("<shortcode>").delete();}catch(PlivoRestException|IOExceptione){e.printStackTrace();}}}
usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacePlivoExamples{classProgram{staticvoidMain(string[]args){varapi=newPlivoApi("<auth_id>","<auth_token>");// Unlink a short code from Powerpacktry{varpowerpack=api.Powerpacks.Get("<powerpack_uuid>");// Version 1varresponse=powerpack.Remove_Shortcode("<shortcode>");// Version 2varresponse=powerpack.numberpool.shortcodes.Remove("<shortcode>");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}
packagemainimport("fmt"plivo"github.com/plivo/plivo-go/v7")funcmain(){client,err:=plivo.NewClient("<auth_id>","<auth_token>",&plivo.ClientOptions{})iferr!=nil{fmt.Print("Error",err.Error())return}// Unlink a short code from Powerpackpowerpack,err:=client.Powerpack.Get("<powerpack_uuid>")iferr!=nil{fmt.Print("Error",err.Error())return}response,err:=powerpack.Remove_shortcode("<shortcode>")iferr!=nil{fmt.Print("Error",err.Error())return}fmt.Printf("Response: %#v\n",response)}
Rate this page
🥳 Thank you! It means a lot to us!
×
Help Us Improve
Thank you so much for rating the page, we would like to get your input
for further improvements!