The Target Info API

Version: 1.0.1

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.

Request Format

JSON

Request Encoding

UTF-8

Output Parameter

Property Type Description Prerequisite Example
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"
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. None http://example.com/api/accept-picture
clientData Any 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
bgColor string(3..20) Optional. HTML color code for default background. None "#3FE801", "white"

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^*"