Send SMS Case

Source: Internet
Author: User

Send SMS case, refer to the blog written by Love

Http://www.cnblogs.com/qingyuan/archive/2010/02/25/1673377.html

Here's how:

1. Registered Account

http://ad.smsadmin.cn/

SMS General Platform Registration account, after the successful registration, the relevant business personnel call to ask you specifically what business, rookie I do not understand, what business is not open

2. Code writing

Related API, login after successful registration, help Center can see

The following is written to facilitate copying

Test url:http://www.smsadmin.cn/smsmarketing/wwwroot/api/get_send/

Send type: GET

Parameters: ? uid=userid&pwd=password&mobile=telephone&msg=msgcontent&dtime=time

Parameter description: UID refers to the account you registered on this platform

PWD is the platform login password

Mobile is the mobile number of the person you want to send. Can be sent a bulk message, send the number in English ";" Separated

MSG is the content sent by SMS

DTIME Specifies the time that the SMS is sent if the time is null is sent immediately (2010-2-25 13:28:00)

Return parameters: 0 successfully sent

2 Insufficient balance

1 Incorrect user name or password

3 over Send maximum 100

4 This user is not allowed to send

5 phone number or send message cannot be empty

6. Include sensitive characters  

Note: The GET interface currently supports only 100 numbers

StringBuilder sb = new StringBuilder ();
Sb. Append ("http://www.smsadmin.cn/smsmarketing/wwwroot/api/get_send/");
var uid = "******"; Registered Account
var pwd = "******"; Password for registration
var msg = "hello! Welcome come to Messgae test, SMS Testing "; Send the content of the SMS
var mobile = "* * * * *"; Receiver's phone number.
Dtime input is sent to point in time, NULL is sent immediately
Sb. AppendFormat ("? Uid={0}&pwd={1}&mobile={2}&msg={3}&dtime={4}", UID, pwd, Mobile, Server.URLEncode ( msg), NULL);
WebClient WebClient = new WebClient ();

return result processing
0 successful Delivery
2 Insufficient balance
1 Incorrect user name or password
3 over send maximum 10,000
4 This user is not allowed to send
5 phone number or send message cannot be empty
6. Include sensitive characters
var result = webclient.downloadstring (sb.) ToString ());

Problem: There is a problem with Chinese encoding, post-resolution

Send SMS Case

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.