【问题标题】:Is there a way to print the POST request URL that the Twilio-API makes when sending SMS?有没有办法打印 Twilio-API 在发送 SMS 时发出的 POST 请求 URL?
【发布时间】:2020-11-13 10:16:30
【问题描述】:

我需要 Twilio 在发送 SMS 时发出的确切请求 URL。有没有办法打印/记录它?当我使用 Message.getUri 方法时,它给了我一些以 .json 结尾的东西,我认为这是 Twilio 在发出请求后的响应。根据我的阅读,它应该类似于“https://api.twilio.com/2010-04-01/Accounts//Messages”。

我正在使用 Java API:

com.twilio.rest.api.v2010.account.Message
    .creator(new PhoneNumber(toNumber), // to
        new PhoneNumber(twilioFromNumber), // from
        textMessage)
    .create();

【问题讨论】:

    标签: twilio twilio-api


    【解决方案1】:

    网址确实是

    https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages.json

    其中ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 是帐户 SID,如果您在 https://www.twilio.com/console 登录 Twilio 帐户控制台,您可以在仪表板上找到它

    在 (https://www.twilio.com/docs/sms/send-messages?code-sample=code-send-an-sms-message&code-language=curl&code-sdk-version=json#linkcode) 上查看更多文档

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 2014-12-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-16
      • 2013-01-16
      相关资源
      最近更新 更多