【问题标题】:Setting Twilio SMS url to blank via REST API通过 REST API 将 Twilio SMS url 设置为空白
【发布时间】:2016-01-26 02:55:54
【问题描述】:

我想为已移植到我的 Twilio 帐户的电话号码禁用 SMS。当一个号码被移植到帐户中时,Twilio 会分配一个演示 URL。如何通过 REST API 将该 URL 清空?当我通过 REST API 尝试时,SMS URL 会得到验证。

【问题讨论】:

    标签: twilio


    【解决方案1】:

    您可以将SmsUrl property 设置为nil

    require 'twilio-ruby' 
    
    # put your own credentials here 
    account_sid = your_account_sid
    auth_token = your_auth_token 
    
    # set up a client to talk to the Twilio REST API 
    @client = Twilio::REST::Client.new account_sid, auth_token 
    
    @client.account.incoming_phone_numbers.get('the phone number ID').update({
    'SmsUrl' => nil
    })
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-17
      • 2019-12-23
      • 2018-02-22
      • 1970-01-01
      • 1970-01-01
      • 2012-08-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多