Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Customer Registration | Customer Login
- Logo easy code platform
- Home
- get verification code
- New hands helping
- common problem
- API interface
- Card business to join
- Contact Customer Service
- API Interface Overview
- Login interface
- Get account information interface
- Get phone number interface
- Get SMS interface
- Send SMS interface
- Get the sending status interface
- Release phone number interface
- Pull black phone interface
- Return code comparison table
- Province code query
- Sample code
- API Interface Document # 007612
- Easy code sms platform open interface overview
- Date: 2/10/2015
- Open interface to developers to provide the platform SMS service calls, the interface call sequence:
- 1, login get token
- 2, access to account information (not required, do not need to call)
- 3, get the phone number
- 4, the use of mobile phone number (will be obtained in this platform to fill in the phone number you want to verify the site or APP), the other side prompts that the number is not available then pull the black regained
- 5, receiving (sending) text messages (usually to receive the verification message sent by the other party, if you need to send the specified content before sending the call to send the interface)
- 6, receiving (sending) success, release the number, the failure is to pull the black number.
- Special Note:
- 1, the success of the interface call will return "success" or "success |" at the beginning of the return value, if failed, then return the corresponding [error code];
- 2, access to the number within 10 minutes has not been released by the user, the system will be forced to release;
- 3, after using the number, please release or pull the black, otherwise the number occupied up to the ceiling will not be able to continue to take the number;
- 4, pull the black number, no separate call release interface, the system automatically release the number;
- Interface communication rules:
- 1, Communication: The platform uses HTTP protocol (GET / POST) communication
- 2, API interface address: http://api.fxhyd.cn/UserInterface.aspx
- 3, call the way: GET / POST
- 4, the default encoding: UTF8 (GB2312 please add the encode parameter encode = gb2312)
- 5, the interface address and parameters are not case-sensitive;
- Login interface
- Date: 2/10/2015
- By account, password for communication token token. This parameter is required for all interface calls except login. Token can also be obtained after login and used directly, that does not need to call the interface to obtain.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: login
- √ String username Username Customer's account on this platform
- √ String password password Customer's password on this platform
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=login&username= your account & password = your password
- return value:
- Login success: success | token
- Login failed: error code, please according to different error code for different processing.
- Get account information interface
- Date: 2/10/2015
- Get the current user's account information.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: getaccountinfo
- √ String token Token value obtained by token login interface
- × integer format return format The value is 1, the system returns JSON format data, otherwise the system returns a format "|" split string.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=getaccountinfo&token=TOKEN
- return value:
- Request parameters format! = 1: success | User name | Account status | Account level | Account balance | Frozen amount | Account discount | Get the maximum number of numbers, "|" is the delimiter (default data format)
- Request parameter format = 1: success | JSON format data
- Request failed: error code, please according to different error code for different processing.
- Get phone number interface
- Date: 2/10/2015
- Specify the number filter rules, get the phone number.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: getmobile
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- × integer isp Carrier code The carrier code to which the code belongs. 1: Mobile, 2: Unicom, 3: Telecom
- × Integer provincial province code number belongs to the province code, province code table.
- × integer City code number Attribution city code, province code table.
- × Integer mobile specified number to specify the number to be obtained, the number must be the number of the platform.
- × Strings excludeno Excluding Numbering Sections Do not get the numbers of segments 170, 171 and 188, then this parameter is 170 | 171 | 180 or 170_171_180. Some IOS systems are not compatible with "|".
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=getmobile&token=TOKEN&itemid= Item Number & excludeno = Exclude Number
- return value:
- Get success: success | phone number
- Request failed: error code, please according to different error code for different processing.
- Get SMS interface
- Date: 2/10/2015
- After you use the retrieved phone number, call this interface to get the text message. Due to the possible delay of SMS, it is recommended to call every 5 seconds and call for more than 60 seconds (to increase the success rate of acquisition).
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: getsms
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- √ integer mobile phone number to get SMS phone number.
- × integer release automatically release the number of identifier If the value of this parameter is 1, get the message while the system will release the phone number. To continue using this number, do not include this parameter.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=getsms&token=TOKEN&itemid= item number & mobile = phone number & release = 1
- return value:
- Received SMS: success | SMS content
- SMS has not yet arrived: 3001, should continue to call the SMS interface, until the timeout.
- Request failed: error code, please according to different error code for different processing.
- Send SMS interface
- Date: 2/10/2015
- Send a message to the corresponding number of the project, the receiving number is fixedly set in the project, and the receiving number can not be specified at will.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: sendsms
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- √ integer mobile phone number to get SMS phone number.
- √ string sms send content to send SMS content, it is recommended to send content URL encoding, to avoid parameter errors caused by special symbols.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=sendsms&token=TOKEN&itemid= Item Number & mobile = Mobile Number & sms = Sending Content
- return value:
- Submit success: success, where the return success only said that the successful submission of the sending task, does not mean that the message has been successfully sent, get the results of the transmission, please call "Get SMS Send Results" interface.
- Request failed: error code, please according to different error code for different processing.
- Get texting result interface
- Date: 2/10/2015
- Get the status of sending SMS, SMS sent due to a certain delay, it is recommended to call once every 5 seconds, call 120 seconds.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: getsendsmsstate
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- √ integer mobile phone number refers to the phone number you use to send SMS.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=getsendsmsstate&token=TOKEN&itemid= Item Number & mobile = Phone Number
- return value:
- Successfully sent: success
- Waiting to send: 3002, indicating that the message is waiting to be sent
- Sending: 3003, indicating that the message is being sent
- Failed to send: 3004, indicating that the SMS has failed to be sent
- Request failed: error code, please according to different error code for different processing.
- Release the phone number interface
- Date: 2/10/2015
- Release the specified phone number. If the number is no longer used, please release it in time, otherwise the number you have not released will not be able to get the new number after reaching the upper limit.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: release
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- √ integer mobile phone number to get SMS phone number.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=release&token=TOKEN&itemid= Item Number & mobile = Phone Number
- return value:
- Successfully released: success
- Request failed: error code, please according to different error code for different processing.
- Pull black phone number interface
- Date: 2/10/2015
- If the number can not be used, please blacklist the number and will not be able to retrieve it later.
- Mandatory Type Field name Name Description
- √ string action interface type fixed value: addignore
- √ String token Token value obtained by token login interface
- √ Integer itemid Item Number The corresponding number of the item
- √ integer mobile phone number to get SMS phone number.
- Interface example:
- http://api.fxhyd.cn/UserInterface.aspx?action=addignore&token=TOKEN&itemid= Item Number & mobile = Phone Number
- return value:
- Successfully released: success
- Request failed: error code, please according to different error code for different processing.
- The system returns an error code comparison table
- Date: 2/10/2015
- In some cases, the system will return the number of the code, according to the following table to query its meaning.
- 1001: Parameter token can not be empty
- 1002: parameter action can not be empty
- 1003: parameter action error
- 1004: token failure
- 1005: user name or password is wrong
- 1006: user name can not be empty
- 1007: password can not be empty
- 1008: Account balance is not enough
- 1009: Account is disabled
- 1010: Parameter error
- 1011: Account to be audited
- 1012: The number of logins has reached the upper limit
- 2001: Parameter itemid can not be empty
- 2002: The project does not exist
- 2003: The project is not enabled
- 2004: No numbers available yet
- 2005: The number of get numbers has reached the limit
- 2006: parameter mobile can not be empty
- 2007: number has been released
- 2008: number is offline
- 2009: sending content can not be empty
- 2010: number is in use
- 3001: have not received the message
- 3002: Waiting to send
- 3003: Sending
- 3004: Sending failed
- 3005: Order does not exist
- 3006: Exclusive channel does not exist
- 3007: Exclusive Channel is not enabled
- 3008: Exclusive channel password does not match item
- 9001: system error
- 9002: system is abnormal
- 9003: The system is busy
- Province code
- Date: 2/10/2015
- If you need to get the phone number of the designated area, please check the corresponding province code by region.
- please choose:
- Province code:
- Copyright © 2015-2018 Easy code verification code receiving platform
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement