The Target Info API

Version: 1.0.5

Installation Place

A web page provided by a client server.

Base Protocol

Universal Link/Deep Link/QR Code Reader

Function Summary

Tell a TapWarp app where to send pictures.

API Entry

Web Browser/Camara

Transfer Encoding

For QR code: plain.
For HTML link: base64 urlencoded.

Note: For HTML link, base64 code can be modified by replacing "+", "/", "=" with ".", "_", "-" , respectively. This can avoid the code being url-encoded.

Request Format

JSON

Request Encoding

UTF-8

Output Parameter

Property Type Description Prerequisite Example
authKey string(64..128) A server provided authentication key that validates the request. It can only consist of alphanumeric ascii characters. None WEIFOCM3843tFE893er89truie...
targetUrl string To this URL picture data will be posted. CGI program at this URL should process according to The Post Picture API 1.0 None http://example.com/api/accept-picture
realm string Optional. A string that may help human user to know to where images are about to be sent. Since 1.0.1 None "Tap Warp On My Site"
fileSinkUrl string Optional. To this URL videos will be posted. CGI program at this URL should process according to The Post File API 1.0 None http://example.com/api/accept-video
clientData Any Optional. Data to be sent back. It will be sent back to the client intact. This structure should as small as possible. None { stockId: ... }
appKey string(64..128) Optional. An application key for advanced functionalities. None 92jtr4ogjoipnbniepwgjre9...
sizeHint string(3..13) Optional. Size hint for the tap warp app to resize the picture. See below for details. None 640x480
targetSize string(3..11) Optional. Suggest the tap warp app to take photo at this size. This is only a suggestion. The underlying system may not supply photos at specified size. But at least, this property may help users avoid storing photos with useless high quality, thus save space and let the app run faster. None 640x480
bgColor string(3..20) Optional. HTML color code for default background. None "#3FE801", "white"
maxVidCnt integer Optional. The maximum number of videos that can be uploaded. Since TapWarp 1.8. None 2
maxPicCnt integer Optional. The maximum number of pictures that can be uploaded. Since TapWarp 1.8. None 20
oneTimeOnly string Optional. "yes" for deleting the target after using it. Otherwise do nothing. Since TapWarp 1.8. None "yes"

The sizeHint parameter

NOTE: In the following table, WIDTH and HEIGHT are placeholders, x is a fixed character that separates width and height.

1 WIDTH Width given, height automagically selected to preserve aspect ratio. Ex, 640
2 xHEIGHT Height given, width automagically selected to preserve aspect ratio. Ex, x480
3 WIDTHxHEIGHT Maximum values of height and width given, aspect ratio preserved. Ex. 640x480
4 WIDTHxHEIGHT^ Minimum values of width and height given, aspect ratio preserved. Ex. 640x480^
5 WIDTHxHEIGHT! Width and height emphatically given, original aspect ratio ignored. Ex. 640x480!
6 WIDTHxHEIGHT> Shrinks an image with dimension(s) larger than the corresponding width and/or height argument(s). Ex. 640x480>
7 WIDTHxHEIGHT< Enlarges an image with dimension(s) smaller than the corresponding width and/or height argument(s). Ex. 640x480<

If an additional asterisk (*) is appended, a frame size will be set. By default, it is the image size. But as long as a numeric size is given, the frame size will be that specified size. Ex, "640x480^*"