Authorization Headers
Each request to the API (Cloud-API and Gateway-API) should include an Authorization header. The Authorization header used for the Cloud-API is different from the Gateway-API.

Get the Cloud-API Authorization Header from the Account Portal

For convenience, clients can find the Authorization Header under Account Details in the Account Portal and use it to send transactions and check account quota.

Reconstruct Authorization Header from the Parameters

REQUEST

Parameters

Gateway-API
Cloud-API
Parameter
Description
rpc_user
RPC username in case gateway was started with
rpc_password
RPC password in case gateway was started with
Parameter
Description
Account ID
Account ID received when registering the account
Secret hash
Secret hash received when registering the account

Examples

Gateway-API
Cloud-API
Authorization header construction code example in Python:
1
import base64
2
base64.b64encode(f"{rpc_user}:{rpc_password}".encode("utf-8")).decode("utf-8")
3
​
Copied!
Authorization header construction code example in Python:
1
import base64
2
base64.b64encode(f"{account_id}:{secret_hash}".encode("utf-8")).decode("utf-8")
3
​
Copied!

Note

Authorization header is not required for gateway started without --rpc-user and --rpc-password.

RESPONSE

Result Field
Description
Authorization
Your authorization header.

Examples

Gateway-API
Cloud-API
​
1
MDM0ZmYwMGEtNmRkNy00YmEyLThlY2MtY2IzYjJjYjA1ODhlOjBkYTkyZmY0YmMzODA0MzRlZTY4YWY1N2I1OTU0ZmQ4
2
​
Copied!
​
1
NzQ4NGJmNzktYzgxMy00NDNkLTljOWQtMDY5MGRlZWFlODNhOjFjNzEzYTMwNDlhMTM4YjE5YzVhNjhkOWUyY2U4MjZm
2
​
Copied!
Last modified 9mo ago