GET https://api.cryptohopper.com/v1/device/authorize

Authorizes the device in the deviceId header with the 6 digit code that was emailed to the account owner. Used by the Cryptohopper mobile apps after signing in on a new device.

This is not the OAuth device authorization grant. The handler checks no OAuth scope. A wrong, expired or malformed code returns 402 Unauthorized. A code allows 5 attempts, and an account is limited to about 15 attempts per 30 minutes. A device that is already authorized returns Authorized without checking the code.

Example request

curl "https://api.cryptohopper.com/v1/device/authorize" \
  -H "access-token: YOUR_ACCESS_TOKEN"

Parameters

Headers

NameTypeRequiredDescription
access-token string Required The OAuth access token of the user.

Query parameters

NameTypeRequiredDescription
code string Optional Required. The 6 digit code from the device authorization email. Surrounding spaces are allowed.

Response

Example response (illustrative values)

{
    "data": "Authorized"
}

Status codes: 200. Errors return JSON with status, error and message. See How the API works for response codes and rate limits.