当前位置:网站首页>Number protection AXB function! (essence)

Number protection AXB function! (essence)

2022-07-05 15:17:00 Add gold development

No advertisement ! Don't limit current !!

preparation :

You can directly drop down to view the instance .

Open Alibaba service :

Conditions : You have completed the registration of Alibaba cloud account , And complete the enterprise real name certification , Please refer to Alicloud account registration process Enterprise real name authentication .

https://account.console.aliyun.com/?spm=a2c4g.11186623.2.3.2e5c748af0dEZN#/auth/home

  • Privacy protection products include AXN Privacy number 、AXB Middle number 、AXN Extension number 、95AXN Privacy number and AXG Five applications of privacy number .
  • Enter the console to open :
  • Be careful : After purchasing the number, the user can “ Number management ” Check whether the purchase number is successful .
  •  

SDK Environment building ( If you use >https Call does not need SDK)

Ali document :https://help.aliyun.com/document_detail/113040.html?spm=a2c4g.11186623.6.621.6a85697a9iff2Y

Project address :https://github.com/aliyun/openapi-sdk-php-client?spm=a2c4g.11186623.2.9.d9c324efbadSja

recommend : After obtaining and registering relevant services, it is adopted directly in Back end direct Ajax request

for example :PHP Back end request , Not recommended js>Ajax Will be exposed directly   Your secret key and other confidential information

HTTPS The method is as follows :

Request structure

Number privacy protection support is based on URL send out HTTP/HTTPS request . Request parameters need to be included in URL in , Both request and return results use  UTF-8  Character set encoding .

Example request structure

The following is one SendSms Uncoded URL Request example :

https://dyplsapi.aliyuncs.com/?Action=BindAxb&< Public request parameters >
  • https  Specifies the request communication protocol .
  • dyplsapi.aliyuncs.com  Specify the service access address for number privacy protection (Endpoint).
  • Action=BindAxb  Specifies the API.
  • < Public request parameters >  Are other public parameters specified by the system .

Request protocol

The protocols used in the request include

  • Support HTTP or HTTPS Protocol request communication . In order to obtain higher security , Recommended HTTPS Protocol send request .
  • binding API use Rest agreement , The signature algorithm uses Alibaba cloud POP agreement .
  • Alibaba cloud message service is used for the receipt of the bill message after the call MNS Realization .

  following SDK Add details ,( You can directly pull down to view ,AXB example A look at will understand )

Service address

Number privacy protection unified use of service address dyplsapi.aliyuncs.com.

Public request header And public response headers

API The public request header is used in the interface (Common Request Headers) And public response headers (Common Response Headers), These contents can be used by all number privacy protection requests .

For details, please refer to Public request parameters and Common response parameters .

Public request parameters ?-- download SDK Can generate , Asking for signature is also , Or use Alibaba tools to generate ( example :)

Number privacy protection is supported through URL launch HTTP request .API The public request header is used in the interface (Common Request Headers), These public request headers can be used by all number privacy protection requests .

establish AccessKey?---

Alibaba website :https://help.aliyun.com/document_detail/53045.htm?spm=a2c4g.11186623.2.6.34f724efiDFrwz

Request example

GET /?Signature=zJDF%2BLrzhj%2FThnlvIToysFRq6t4%3D
&AccessKeyId=testId
&Action=BindAxb
&Format=XML
&OutId=123
&PhoneNumbers=15300000001
&RegionId=cn-hangzhou
&SignName=%E9%98%BF%E9%87%8C%E4%BA%91%E7%9F%AD%E4%BF%A1%E6%B5%8B%E8%AF%95%E4%B8%93%E7%94%A8
&SignatureMethod=HMAC-SHA1
&SignatureNonce=45e25e9b-0a6f-4070-8c85-2956eda1b466
&SignatureVersion=1.0
&PoolKey=FC123456
&PhoneNoA=170000000
&PhoneNoB=171000000
&ExpireDate=2017-07-12T02%3A42%3A19Z
&Timestamp=2017-07-12T02%3A42%3A19Z
&Version=2017-05-25

Request parameters

 
name type If required explain
SignatureString yes Ask for signature , That is, the final generated signature result value .

How to generate a request signature , Please check out Ask for signature .

AccessKeyIdString yes Access key ID.AccessKey Used to invoke API.
ActionString yes API The name of .
FormatString no Return the language type of the parameter . Value range :json | xml. The default value is :json.
RegionIdString no API Supported by RegionID, Such as number privacy protection API The value of is :cn-hangzhou.
SignatureMethodString yes Signature method . Value range :HMAC-SHA1.
SignatureNonceString yes Signature unique random number . Used to prevent network replay attacks , It is recommended that you use different random numbers for each request .

JAVA It is suggested to use :java.util.UUID.randomUUID() Generate .

SignatureVersionString yes Signature algorithm version . Value range :1.0.
TimestampString yes Timestamp of the request . according to ISO8601 Standard said , And need to use UTC Time , The format is yyyy-MM-ddTHH:mm:ssZ. Example :2018-01-01T12:00:00Z  Beijing time 2018 year 01 month 01 Japan 20 spot 00 branch 00 second .
VersionString yes API Version number of , The format is YYYY-MM-DD. Value range :2017-05-25.

Common response parameters

Number privacy protection is supported through URL launch HTTP request .API The public response header is used in the interface (Common Response Headers), These public response headers can be used by all number privacy protection requests .

Return to example

In addition to business parameters , Number privacy protection also returns public parameters , The return example is as follows .

  • JSON Format :
    {
      "RequestId":"2184201F-BFB3-446B-B1F2-C746B7BF0657"
    }
  • XML Format :
    <?xml version='1.0' encoding='UTF-8'?>
    <BindAxbResponse>
    	<RequestId>E8534574-7381-4810-8F70-65B37BBA8970</RequesetNo>
    </BindAxbResponse>

 API Error code

Error code (Code) error message (Message)
OKOK
isp.RAM_PERMISSION_DENYRAM jurisdiction DENY
isv.OUT_OF_SERVICE Business downtime
isv.PRODUCT_UN_SUBSCRIPT Alibaba cloud customers who have not opened cloud communication products
isv.ACCOUNT_NOT_EXISTS Account does not exist
isv.ACCOUNT_ABNORMAL Account exception
isp.SYSTEM_ERRORisp.SYSTEM_ERROR
isp.UNKNOWN_ERR_CODE Operator unknown error
isv.PARTNER_NOT_EXIST Unknown partner
isv.NO_NOT_EXIST The number doesn't exist
isv.ILLEGAL_ARGUMENT invalid parameter
isp.DAO_EXCEPTION Database exception
isv.NO_AVAILABLE_NUMBER No number available
isp.VENDOR_UNAVAILABLE Operator downgrade
isv.FLOW_LIMIT Business flow control
isv.PARTNER_IS_CLOSEDpartner Shut down
isv.FORBIDDEN_ACTION No right to operate
isv.NO_USED_BY_OTHERS The number is occupied by other business parties
isv.VENDOR_BIND_FAILED Operator binding failed
isv.EXPIRE_DATE_ILLEGAL The expiration time is illegal
isv.MOBILE_NUMBER_ILLEGAL Illegal number format
isv.BIND_CONFLICT Binding conflict

AXB binding : 

binding AXB Before the number , Please clarify your business scenario first AXB Triple A Roles and B role . for example , In the application scenario of taxi ,A It can be a passenger role ,B It's the driver role ;

Example

Request example

http(s)://[Endpoint]/?PhoneNoA=15000000000&Expiration=2019-09-05 12:00:00&PhoneNoB=15000000001&PoolKey=FC123456&< Public request parameters >

Normal return example

XML  Format

<BindAxbResponse>      <Message>OK</Message>      <RequestId>9297B722-A016-43FB-B51A-E54050D9369D</RequestId>      <Code>OK</Code>      <SecretBindDTO>            <Extension>130</Extension>            <SecretNo>17100000000</SecretNo>            <SubsId>1000000768393849</SubsId>      </SecretBindDTO></BindAxbResponse>

JSON  Format

{    “Message”:”OK”,    “RequestId”:”9297B722-A016-43FB-B51A-E54050D9369D”,    “Code”:”OK”,    “S

 

Request parameters

 
name type Whether the choice Example value describe
ExpirationString yes 2019-09-05 12:00:00

Expiration time of binding relationship . Must be later than the current time 1 Minutes or more .

PhoneNoAString yes 15000000000

AXB Medium A number .

A The number can be set as mobile number or fixed phone , Area code is required for fixed telephone , There is no need to add a hyphen between the area code and the number , for example 057188992688.

PhoneNoBString yes 15000000001

AXB Medium B number ,A Dial the number X The number will be transferred to B number , Through the interface UpdateSubscription to update B number .

B The number can be set as mobile number or fixed phone , Area code is required for fixed telephone , There is no need to add a hyphen between the area code and the number , for example 057188992688.

PoolKeyString yes FC123456

Number pool Key. Please log in Number privacy console , stay Number pool management View the number pool Key.

AccessKeyIdString no LTAIP00vvvvvvvvv

Main account number AccessKey Of ID.

ActionString no BindAxb

The system specifies the parameters . Value :BindAxb.

CallDisplayTypeInteger no 1

Reset the number display logic in the binding relationship ,1: The main callee displays the middle number X;2:B/N When calling by side number , to A Side number display B/N Your real number ;3:A When calling by side number , to B/N The side number shows the real number .

ExpectCityString no Beijing

Designated cities X Number selection .

If there is no available number of the city in the current number pool , Or this parameter is not specified , Randomly assign a number of other cities from the current number pool as X number .

If strict mode is configured , If there is no qualified number, an allocation error will be prompted .

IsRecordingEnabledBoolean no true

Whether to record all calls generated by this binding relationship .

OutIdString no abcdef

External business extension fields , This parameter will be returned in the call record receipt message .

OutOrderIdString no abcdef

External business ID.

PhoneNoXString no 17000000000

AXB Medium X number . Not specified X At the number , According to the parameters ExpectCity Randomly specify a number from the specified number pool as X number .

X The number is before you bind the number on the console or through the interface BuySecretNo Phone number of purchase , For transferring calls .

RingConfigString no {“AXBRing_B”:”100000001”,”AXBRing_A”:”100000001”}

Set up AXB Binding level enterprise RBT playback , Support setting for this binding relationship , The contents are as follows :

  • AXB in ,A Number call X Ring tone setting :AXBRing_A
  • AXB in ,B Number call X Ring tone setting :AXBRing_B
  • Enterprise RBT code : The enterprise RBT code can be queried in the management console , Concrete adoption 【 Console - Number pool management - Enterprise RBT management 】 Access to view 、 management , Support upload 、 Delete and other operations .

Special instructions : The enterprise RBT preferentially uses the RBT set by the binding level , If it is not set or the setting does not take effect , The number pool level RBT tone will be used .

AXN binding  

AXN The privacy number is A Number assign a private number , Any number N By dialing X All numbers can be transferred to A.

Example

Request example


http(s)://[Endpoint]/?Expiration=2019-09-05 12:00:00
&PhoneNoA=15000000000
&PoolKey=FC123456
&< Public request parameters >

Normal return example

XML  Format

<BindAxnResponse>
	  <Message>OK</Message>
	  <RequestId>F655A8D5-B967-440B-8683-DAD6FF8DE990</RequestId>
	  <Code>OK</Code>
	  <SecretBindDTO>
		    <Extension>13100000000</Extension>
		    <SecretNo>17000000000</SecretNo>
		    <SubsId>1000000768798832</SubsId>
	  </SecretBindDTO>
</BindAxnResponse>

JSON  Format

{
	"Message":"OK",
	"RequestId":"F655A8D5-B967-440B-8683-DAD6FF8DE990",
	"Code":"OK",
	"SecretBindDTO":{
		"Extension":"13100000000",
		"SecretNo":"17000000000",
		"SubsId":"1000000768798832"
	}
}

 

Request parameters

 
name type Whether the choice Example value describe
ExpirationString yes 2019-09-05 12:00:00

Expiration time of binding relationship . Must be later than the current time 1 Minutes or more .

PhoneNoAString yes 15000000000

AXN Medium A number .

A The number can be set as mobile number or fixed phone , Area code is required for fixed telephone , There is no need to add a hyphen between the area code and the number , for example 057188992688.

PoolKeyString yes FC123456

Number pool Key. Please log in Number privacy console , stay Number pool management View the number pool Key.

AccessKeyIdString no LTAIP00vvvvvvvvv

Main account number AccessKey Of ID.

ActionString no BindAxn

The system specifies the parameters . Value :BindAxn.

CallDisplayTypeInteger no 1

Reset the number display logic in the binding relationship ,1: The main callee displays the middle number X;2:B/N When calling by side number , to A Side number display B/N Your real number ;3:A When calling by side number , to B/N The side number shows the real number .

ExpectCityString no Shanghai

Designated cities X Number selection .

If there is no available number of the city in the current number pool , Or this parameter is not specified , Randomly assign a number of other cities from the current number pool as X number .

If strict mode is configured , If there is no qualified number, an allocation error will be prompted .

IsRecordingEnabledBoolean no true

Whether to record all calls generated by this binding relationship .

NoTypeString no AXB_170

Number type .

explain   It is applicable to the former Alibaba customers , Alibaba cloud users can ignore .

OutIdString no abcdef

External business extension fields , This parameter will be returned in the call record receipt message .

OutOrderIdString no abcdef

External business ID.

PhoneNoBString no 13100000000

AXN Medium B number ,A Dial the number X The number will be transferred to B number , Through the interface UpdateSubscription to update B number .

B The number can be set as mobile number or fixed phone , Area code is required for fixed telephone , There is no need to add a hyphen between the area code and the number , for example 057188992688.

PhoneNoXString no 17000000000

AXN Medium X number . Not specified X At the number , According to the parameters ExpectCity Randomly specify a number from the specified number pool as X number .

X The number is before you bind the number on the console or through the interface BuySecretNo Phone number of purchase , For transferring calls .

RingConfigString no {"AXNRing_N":"100000001","AXNRing_A":"100000001"}

Set up AXN Binding level enterprise RBT playback , Support setting for this binding relationship , The contents are as follows :

  • AXN in ,A Number call X Ring tone setting ( There is a callback number ):AXNRing_AB
  • AXN in ,A Number call X Ring tone setting ( No callback number ):AXNRing_A
  • AXN in ,N Dial the side number X Ring tone setting :AXNRing_N
  • Enterprise RBT code : The enterprise RBT code can be queried in the management console , Concrete adoption 【 Console - Number pool management - Enterprise RBT management 】 Access to view 、 management , Support upload 、 Delete and other operations .

Special instructions : The enterprise RBT preferentially uses the RBT set by the binding level , If it is not set or the setting does not take effect , The number pool level RBT tone will be used .

原网站

版权声明
本文为[Add gold development]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140516364068.html