GET
https://api.cryptohopper.com/v1/device/{device}/revoke
Revokes the authorization of one of your devices, so it has to be authorized again with an emailed code. The calling device must itself be authorized.
The handler checks no OAuth scope. The device record is kept with state 0 and a revokedAt time.
Example request
curl "https://api.cryptohopper.com/v1/device/DEVICE/revoke" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/device/DEVICE/revoke', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/device/DEVICE/revoke",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/device/DEVICE/revoke');
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 |
|---|---|---|---|
access-token |
string | Optional | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
device |
string | Required | The deviceId string of the device to revoke, as returned in the deviceId field of List your devices. The numeric id is not accepted. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
secret |
string | Optional | Optional two factor authentication code. When sent, it must be valid for the account or the request fails with 404 Wrong 2FA. |
Response
{
"data": "ok"
}