简体   繁体   English

如何配置短信 API?

[英]How to configure SMS API?

I was trying to configure an SMS plugin.我试图配置一个 SMS 插件。 But I am pretty sure, I am doing something wrong.但我很确定,我做错了什么。 Can anyone help me with the configuration?谁能帮我配置一下?

Information needed for the plugin:插件所需的信息:

  1. SMS Gateway URL短信网关URL
  2. HTTP Header HTTP Header
  3. HTTP Method HTTP 方法
  4. Gateway Parameters网关参数
  5. Sender ID发件人ID

Information provided by the SMS service provider:短信服务商提供的信息:

  1. API URL (GET & POST): http://gsms.pw/smsapi?api_key=(APIKEY)&type=text&contacts=(NUMBER)&senderid=(Approved Sender ID)&msg=(Message Content) API URL (GET & POST): http://gsms.pw/smsapi?api_key=(APIKEY)&type=text&contacts=(NUMBER)&senderid=(Approved Sender ID)&msg=(Message Content)
  2. api_key - API Key - Your API Key (C200095761d4749ec630f5.76399030) api_key - API 密钥 - 您的 API 密钥 (C200095761d4749ec630f5.76399030)
  3. type - text/unicode - text for normal SMS/unicode for Bangla SMS type - text/unicode - 普通短信的文本/孟加拉短信的 unicode
  4. contacts - mobile number - Exp: 88017XXXXXXXX+88018XXXXXXXX+88019XXXXXXXX...联系人 - 手机号码 - Exp: 88017XXXXXXXX+88018XXXXXXXX+88019XXXXXXXX...
  5. msg - SMS body - NB: Please use url encoding to send some special characters like &, $, @ etc msg - SMS body - 注意:请使用 url 编码发送一些特殊字符,如 &、$、@ 等

Screenshot of Plugin:插件截图:

  1. https://prnt.sc/25zpvl5 https://prnt.sc/25zpvl5
  2. https://prnt.sc/25zq23q https://prnt.sc/25zq23q

Screenshot of SMS API:短信API截图:

  1. https://prnt.sc/25zqbrj https://prnt.sc/25zqbrj

The plugin is "Digits" by United Over for WordPress.该插件是 United Over 的“Digits”,用于 WordPress。 The problem I am facing is, the SMS Gateway I am trying to use is not listed in this plugin.我面临的问题是,我尝试使用的 SMS 网关未在此插件中列出。 Moreover, I am not familiar with API stuff.此外,我不熟悉 API 的东西。 So, I don't know what is HTTP Header, Gateway Parameters & I don't know how to write these codes correctly.所以,我不知道HTTP Header是什么,网关参数&我不知道如何正确编写这些代码。 But I have to write the HTTP Header in the correct format.但是我必须以正确的格式编写 HTTP Header。

***The API Key I posted here is not correct. ***我在这里发布的 API 密钥不正确。

How to configure Digits for WordPress for a custom SMS service provider?如何为自定义 SMS 服务提供商配置 WordPress 的数字?

In this case, we are using GSMS by Dianahost Ltd. Dianahost is a Bangladeshi IT service provider.在这种情况下,我们使用 Dianahost Ltd. 的 GMS。Dianahost 是孟加拉国的 IT 服务提供商。

  1. Select Custom Gateway. Select 自定义网关。

  2. Copy and paste the API URL in "SMS Gateway URL" field.将 API URL 复制并粘贴到“短信网关 URL”字段中。

  3. Delete the following parameters from the API URL:从API URL中删除以下参数:

sender_id/sender_number
destination/to/contact/receiver
message/sms/msg
  1. Now in the "Gateway Parameters" field you have to put the parameters you deleted from the API URL.现在在“网关参数”字段中,您必须输入从 API URL 中删除的参数。 Separate all parameters with commas and separate the value with : .(eg: contacts:{to},msg:{message},senderid:{sender_id} ).用逗号分隔所有参数并用:分隔值(例如: contacts:{to},msg:{message},senderid:{sender_id} )。

Here "contacts" is a parameter provided by the SMS Service Provider and "to" is a value generated by the plugin.这里的“contacts”是 SMS 服务提供商提供的参数,“to”是插件生成的值。

  1. Done!完毕!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM