The Auth API issues the authentication token required for using Hive Blockchain API and Blockchain Open API.

Issue Authentication Token

This API issues the authentication token required to use the blockchain service APIs.

Request URL

Live URL https://bc-platform-auth.withhive.com/v2/auth-token
Sandbox URL https://sandbox-bc-platform-auth.withhive.com/v2/auth-token
HTTP Method POST
Content-Type application/json

Request Body

Field Name Description Type Required
id The ID value for issuing the authentication token string Y
secretKey The secret key required to use an API string Y

Responses

Field Name Description Type
code api request result code, 0: success number
message the result message string
data API Response json
data.accessToken The authentication token required to use an API string
data.refreshToken A token that is used to issue a new accessToken when the old accessToken is expired string

Request Sample

Response Sample

Re-issue Authentication Token

It is an API that uses the refresh token issued with the previous authentication token to issue a new authentication token required to use the blockchain service APIs (Hive Blockchain Open APIs, Hive Blockchain APIs) when the previous authentication token expired.

Request URL

Live URL https://bc-platform-auth.withhive.com/v2/refresh-token
Sandbox URL https://sandbox-bc-platform-auth.withhive.com/v2/refresh-token
HTTP Method POST
Content-Type application/json

Request Header

Field Name Description Type Required
Authorization refreshToken required when calling an API string Y

Request Body

There is no Request Body.

Response

Field Name Description Type
code api request result code, 0: success number
message the result message string
data API Response json
data.accessToken The authentication token required to use an API string
data.refreshToken A token that is used to issue a new accessToken when the old accessToken is expired string

Request Sample

Response Sample