1.Overview
Developers send required parameters to server to get QRcode image(base64)。
2.Examples
Language Explanation Download Version
php php_sdk instructions Download SDK and DEMO V2.0
java java_sdk instructions Download SDK and DEMO V2.0
c# c#_sdk instructions Download SDK and DEMO V2.0
3. Request URL
4. Request parameter format
/?c=Qrcode&a=getCard&sig={sig}
Sig is the encryption result of developer account SID and Auth Token, get details in Development documentation
HTTP request header:
Accept:application/json;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{"mobile":"1330000000","areaCode":"86","communityNo":"13444456566","time":"unix timestamp","cardNo":"DB18Q4V6pe57qvrX","cardType":"0"}
5. Parameter specification
Attribute Type Constraint Explanation
accountSid String Required Developer Account SID, the unique identifier of developer(32 characters of letters and numbers).
sig String Required Signature, API request required.
Accept String Required Standard HTTP header, content-type: application/json
Content-Type String Required Standard HTTP header, type:application/x-www-form-urlencode;charset=utf-8
Authorization String Required HTTP header authentication information
mobile String Required Mobile
areaCode String Optional Mobile users belong to the country code (default 86)
communityNo String Required Community No.
time String Required UNIX timestamp, for example:1448523919
cardNo String Required Room card identification. Request with this parameter means return this room card.
cardType String Optional Key type (0: room card, 1: floor card, 2: building card, default 0 when not being transmitted).
6. HTTP JSON request demo
HTTP header
Accept:application/json;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{"mobile":"1330000000","areaCode":"86","communityNo":"13444456566","time":"1448523919","cardNo":"DB18Q4V6pe57qvrX","cardType":"0"}
Http Request parameters
/?c=Qrcode&a=getCard&sig=031A94222BB0AF73AA0DCDEB92D54609
Successful result(base64QR CodePicture)。
{"status":"200","info":"success","baseImg":"iVBORw0KGgoAAAANSUhEUgAAAM0AAADNAQMAAAAhcmYqAAAABlBMVEX///8AAABVwtN+AAABtElEQVRYhe2XO46EQAxEazRBh3uEvglcDAkkLsbepI9ASIDGW+WeWT7aTU2Cg54eXmLZRdkAd9zxb3yZ2UsHo/A26jLEI/40QF4eNhY85mepz6LRaEvDDJcGz5KMnGlehdaMplbrSoSnOG/8exFSv5RhOyOniejYyijk6h2LMvTjLOwYVPmqs0OyGaeIQl12zaYX+oKW6aVPvyKRWgX0qtaa0/fc6UA8Gk2WApskYbZPaQ7hSEYysVX2bVQMq2V4XIOY0gozeutHwvGIXaLFr1jauS9Mc8gsGeKRGd2EYqFm5bIDWK14pFCDkgplU5VwPHK5auSKs2R7YUciDhlOfs0cLgLYqzcUMa/W/IX2Qu3VG4ooV95psB189G3qDUR096T9kL7Sl0U12tQbidzY2SX6ysnnI5HmblNnDjKOIyAQqVDqlylNtkrq/SQfiCibamp68N6bN/WGoTeHb2dJO9mm3kBU90N/k9i51pf2K9AAHzJKLtcMf9UbifzbwV9j/3Zgv/Y+H4rehcrpdVBvNKKv+GJ22ogikffLig88bmeHERCIpF7NXRmsm5rZHI/uuOPP+AEA3a22UTAOSAAAAABJRU5ErkJggg=="}
Fail result:
{ "status": 4003, "info": "some error" }
7. XML request demo
HTTP header
Accept:application/xml;
Content-Type:application/x-www-form-urlencode;charset=uft-8;
Authorization:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
<?xml version='1.0' encoding='utf-8'?>
<Request>
<mobile>18819238549</mobile>
<communityNo>1316879800</communityNo>
<time>1448523919</time>
<areaCode>86</areaCode>
<cardNo>DB18Q4V6pe57qvrX</cardNo>
<cardType>0</cardType>
</Request>
Http Request parameters
/?c=Qrcode&a=getCard&sig=031A94222BB0AF73AA0DCDEB92D54609
Successful result(base64QR CodePicture)。
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<status>200</status>
<info>success</info>
<baseImg>iVBORw0KGgoAAAANSUhEUgAAAM0AAADNAQMAAAAhcmYqAAAABlBMVEX\/\/\/8AAABVwtN+AAABtElEQVRYhe2XO46EQAxEazRBh3uEvglcDAkkLsbepI9ASIDGW+WeWT7aTU2Cg54eXmLZRdkAd9zxb3yZ2UsHo\/A26jLEI\/40QF4eNhY85mepz6LRaEvDDJcGz5KMnGlehdaMplbrSoSnOG\/8exFSv5RhOyOniejYyijk6h2LMvTjLOwYVPmqs0OyGaeIQl12zaYX+oKW6aVPvyKRWgX0qtaa0\/fc6UA8Gk2WApskYbZPaQ7hSEYysVX2bVQMq2V4XIOY0gozeutHwvGIXaLFr1jauS9Mc8gsGeKRGd2EYqFm5bIDWK14pFCDkgplU5VwPHK5auSKs2R7YUciDhlOfs0cLgLYqzcUMa\/W\/IX2Qu3VG4ooV95psB189G3qDUR096T9kL7Sl0U12tQbidzY2SX6ysnnI5HmblNnDjKOIyAQqVDqlylNtkrq\/SQfiCibamp68N6bN\/WGoTeHb2dJO9mm3kBU90N\/k9i51pf2K9AAHzJKLtcMf9UbifzbwV9j\/3Zgv\/Y+H4rehcrpdVBvNKKv+GJ22ogikffLig88bmeHERCIpF7NXRmsm5rZHI\/uuOPP+AEA3a22UTAOSAAAAABJRU5ErkJggg==</baseImg>
</Response>
Fail result:
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<status>4003</status>
<info> some error </info>
</Response>
Sales
Software
Aftersales
Telephone
400-8618286