国际验证码接口供应商:如何获取国际短信验证码?
                
                    2020-11-04 00:00:00   
                    来源:http://www.jzyyun.com/   
                    点击:3574   
                    喜欢:0
                
                  国际验证码接口供应商:如何获取国际短信验证码?  #!/usr/local/bin/python  #-*-coding:utf-8-*-  #Author:jacky  #Time:14-2-22下午11:48  #Desc:短信http接口的python代码调用示例  import httplib  import urllib  import json  #服务地址  host="intapi.xxxxxxxxx.com"  #端口号  port=80  #版本号  version="v1.1"  #查账户信息的URI  balance_get_uri="/balance/json"  #智能匹配模版短信接口的URI

  sms_send_uri="/send/json"  #,xxxx账号  account=""  #,xxxx密码  password=""  def get_user_balance():  """  取账户余额  """  params={'account':account,'password':password}  params=json.dumps(params)  headers={"Content-type":"application/json"}  conn=httplib.HTTPConnection(host,port=port)  conn.request('POST',balance_get_uri,params,headers)  response=conn.getresponse()  response_str=response.read()  conn.close()  return response_str  云通讯平台---国际短信接口调用demo  def send_sms(text,phone):  """  能用接口发短信  """  params={'account':account,'password':password,'msg':urllib.quote(text),'mobile':phone,'report':'false'}  params=json.dumps(params)  headers={"Content-type":"application/json"}  conn=httplib.HTTPConnection(host,port=port,timeout=30)  conn.request("POST",sms_send_uri,params,headers)  response=conn.getresponse()  response_str=response.read()  conn.close()  return response_str  if __name__=='__main__':  #手机号码,格式(区号+手机号码),例如:8615800000000,其中86为中国的区号  phone="8615800000000"  text="xxxxx您的验证码是1234"  #查账户余额  print(get_user_balance())  #调用智能匹配模版接口发短信  print(send_sms(text,phone))  【郑州嘉之元计算机科技有限公司】专业提供短信群发平台,短信验证码,106短信平台,短信接口,国际短信,物联网等云通讯服务,是优质的短信平台服务商.                
                    上一篇:短信群发:双十一营销短信的热潮你赶上了吗?
                    下一篇:106短信群发平台短信多少钱一条?