GET
https://api.cryptohopper.com/v1/device/check
For the Cryptohopper mobile apps, checks that the device in the deviceId header exists and is authorized. For any other app it always returns ok.
The handler checks no OAuth scope. Returns 404 Device not found or 402 Device not authorized when the check fails.
Example request
curl "https://api.cryptohopper.com/v1/device/check" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/device/check', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/device/check",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/device/check');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
client_id |
string | Optional | Not read by the handler. |
access-token |
string | Optional | The OAuth access token of the user. |
Response
{
"data": "ok"
}