How to obtain and use APIs access credentials
x-ti-app-id
and x-ti-secret-code
on the TextIn Homepage - Account & Billing - Account & Developer Information page for request authentication.
x-ti-app-id
and x-ti-secret-code
as HTTP headers for authentication.
Example:
Header | Description |
---|---|
x-ti-app-id | x-ti-app-id obtained from TextIn developer information |
x-ti-timestamp | Unix Epoch timestamp, in seconds |
x-ti-signature | Request signature, calculation method described below |
lower()
is the lowercase letter conversion functionhex()
converts byte array to hexadecimal stringHMAC_SHA256
is a cryptographic hash function, refer to libraries in various development languagessigning_key = HMAC_SHA256(x-ti-secret-code, epoch)
. Where x-ti-secret-code
is the TextIn developer credential. epoch
is the Unix Epoch timestamp (seconds).string_to_sign
, detailed explanation belowstring_to_sign
is a string concatenated from the following content:
GET
, POST
/api/app-api/sip/platform/v2/file/upload
workspace_id=12345&batch_num=54321&file_name=invoice.pdf
,batch_num=54321&file_name=invoice.pdf&workspace_id=12345
.
Important:
&
, with no &
at the end