Authentication for Instance and Transactions REST APIs

Authentication for the instance and transactions (data plane) APIs requires a mix of having the correct Oracle Blockchain Platform roles assigned to the user and using an authentication method such as OAuth 2.0.

The blockchain platform instance and transactions REST APIs are those included in:
  • Applications Operations
  • Blockchain Network Administrative Operations
  • Statistics

Ensure that you have the appropriate login credentials for working with Oracle Blockchain Platform instances, as described in Administering Oracle Blockchain Platform on Oracle Cloud Infrastructure (Gen 2).

Note:

As a general Oracle Cloud Infrastructure security rule, basic authentication is not recommended as an authentication method, due to its inherent flaws. Refer to Use OAuth 2.0 Access Token Based Authentication for information on how to configure and use OAuth 2.0 access token based authentication.
You access the Oracle Blockchain Platform REST resources over HTTPS and must provide the following information for authentication:
  • User name and password for your Oracle Blockchain Platform account.

To authenticate using cURL use the -u cURL option to pass the user name and password for your Oracle Blockchain Platform account.

The following provides an example cURL command:
curl -i -X GET -u <username>:<password>\
 -H <request-header>:<value>\ 
 https://<rest_server_url:port>/<resource-path>

Note:

Multi-factor authentication isn't supported when using basic auth. If you get a 401 authorization error, ensure that the user making the REST calls doesn't have multi-factor authentication enabled.

Using Default Authentication

If you are using the default REST authentication, the administrator of the Oracle Blockchain Platform instance must have also granted you the REST_CLIENT role under the <instance_name>_<id> in Oracle Identity Cloud Service (IDCS) or your Oracle Cloud Infrastructure Identity and Access Management (IAM) identity domain before you can interact with the instance using the REST API.