Skip to content

Authenticate

METHOD NAME authenticate

This method doesn't require authentication.

Description

This completes the authentication process that started with a call to pair by providing the displayed OTP and returning apiKey to use in the appropriate header to authenticate each method call.

Requires state PAIRING and on success moves to IDLE

Parameters

object

  • otp string REQUIRED
    Displayed OTP (Length 6)

Result

object on success

  • apiKey string
    Generated key to attach to each request header

Errors

  • MissingParams
  • InvalidParams on incorrect OTP
  • IllegalState

Example

Request

1
2
3
4
5
6
7
8
{
  "jsonrpc": "2.0",
  "id": "1234567890",
  "method": "authenticate",
  "params": {
    "otp": "123456"
  }
}

Response

1
2
3
4
5
6
7
{
  "jsonrpc": "2.0",
  "id": "1234567890"
  "result": {
    "apiKey": "1234abcd"
  }
}