Android API Endpoints
HeadSpin provides HTTP API endpoints to interact with the biometric prompt:
Method |
Route |
Payload |
Request / Response |
Notes |
GET |
/v0/instrument/biometrics/ |
None |
{"prompt": [true \| false], "success": [true \| false]} |
Wait t seconds for the status of the biometric prompt (prompt: true for visible and prompt: false for invisible) The hostname query parameter is mandatory. |
POST |
/v0/instrument/biometrics/ |
{action: [succeed, error, fail, help], hostname: hostname} |
{"success": [true \| false]} |
Calls the reply callback on the device based on the action provided. Both action and hostname fields in the payload are mandatory. |
API Examples
GET the status of the biometric prompt on the device.
curl -H "Authorization: Bearer <your_api_token>" https://api-dev.headspin.io/v0/instrument/biometrics/{ios-device-id}/prompt?hostname={hostname}
Response
A JSON object in the form of <code class="dcode">{"prompt": [true | false], "success": [true | false]}</code> that informs if the biometric prompt is in the foreground.
{"prompt": true, "success": true}
POST to authenticate past the prompt with the desired action.
curl -H "Authorization: Bearer <your_api_token>" https://api-dev.headspin.io/v0/instrument/biometrics/{ios-device-id}/authenticate -d '{"action": "succeed", "hostname": "${ios_hostname}"}'
The available actions are <code class="dcode">succeed</code> and <code class="dcode">error</code>.
Response
A JSON object in the form of <code class="dcode">{"success": [true | false]}</code> is returned.
iOS API Endpoints
HeadSpin provides HTTP API endpoints to interact with the biometric prompt:
Method |
Route |
Payload |
Request / Response |
Notes |
GET |
/v0/instrument/biometrics/ |
None |
{"prompt": [true \| false], "success": [true \| false]} |
Wait t seconds for the status of the biometric prompt (prompt: true for visible and prompt: false for invisible) The hostname query parameter is mandatory. |
POST |
/v0/instrument/biometrics/ |
{action: [succeed, error], hostname: hostname} |
{"success": [true \| false]} |
Calls the reply callback on the device based on the action provided. Both action and hostname fields in the payload are mandatory. |
API Examples
GET the status of the biometric prompt on the device.
curl -H "Authorization: Bearer <your_api_token>" https://api-dev.headspin.io/v0/instrument/biometrics/{ios-device-id}/prompt?hostname={hostname}
Response
A JSON object in the form of <code class="dcode">{"prompt": [true | false], "success": [true | false]}</code> that informs if the biometric prompt is in the foreground.
{"prompt": true, "success": true}
POST to authenticate past the prompt with the desired action.
curl -H "Authorization: Bearer <your_api_token>" https://api-dev.headspin.io/v0/instrument/biometrics/{ios-device-id}/authenticate -d '{"action": "succeed", "hostname": "{hostname}"}'
The available actions are <code class="dcode">succeed</code> and <code class="dcode">error</code>.
Response
A JSON object in the form of <code class="dcode">{"success": [true | false]}</code> is returned.