Orangepill Docs
  • Getting Started
    • Introduction
  • Orangepill API
    • Overview
    • Realms and Admins
    • Identities and Users
    • Persons and Companies
    • Messaging Channels
    • Digital Assets
    • Custom Digital Assets
    • Virtual Currencies
    • Ramp Accounts
    • Deposit Accounts
    • Virtual Accounts
    • Aliases
    • Withdrawal
    • Transactions
    • Payment gateways
    • Payouts
    • KYC
  • SmartApps
    • Payment Request
      • Payment Request v1.0
    • Forwarding Transactions
    • Blockchain Deposits
    • Accept Blockchain Payments
    • Orderbook
    • Exchange Rates
  • WebSocket Subscriptions
  • Extensions
    • Infobip People CDP
  • On Ramps and Off Ramps
  • Integrations
    • Infobip Exchange
  • Tutorials
    • Conversational Wallet
    • Crypto Payments Processor
      • Project Setup
      • Merchants Onboarding
      • Process Payment
      • Withdraw Revenue
      • Build Reports
      • Automatic Revenue Fees
    • Cryptocurrency Exchange
    • Simple ETH Wallet
  • Orangepill API Reference
Powered by GitBook
On this page
  • Setup Realm Admin User
  • List available API credits

Was this helpful?

  1. Orangepill API

Realms and Admins

Realm is isolated domain of data.

PreviousOverviewNextIdentities and Users

Last updated 10 months ago

Was this helpful?

Use Orangepill Console to purchase credits and activate access to Tiers. Tiers are available in various Cluster Zones (US, EU). Each activated Tier will be deployed as new Realm. Tier settings like rate limit and available API credits apply to each Realm.

Realm data is physically isolated and private. It cannot be shared with other Realms.

Use Realms to separate various projects and data domains. You cannot make transactions or share identities, virtual accounts or any other entity outside the scope of Realm.

Setup Realm Admin User

You can create Users for the Realm using Orangepill Console or using API.

You can find realm.id in Orangepill Console.

For Roles list check .

For Scopes list check .

New Identity will be created and assigned to new User. Fieldsidentity.country and identity.accounting_currency will be set to realm.country and realm.accounting_currency values.

echo "create admin user for Realm id=634b5be77f6a7b0be52dffcc"

curl --location --request POST 'https://api.orangepill.cloud/v1/realms/634b5be77f6a7b0be52dffcc/users' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "user1",
    "password": "password1",
    "scopes": "realm",
    "roles": "admin",
    "data": {
        "my_field_1": "my_value_1",
        "email": "optional@email.com"
    }
}'

In response we get new Admin User in Realm with access to all scopes. You can use this User to interact with API.

{
    "id": "636eb6d79cfba3cb92ac479a",
    "username": "user1",
    "password": "21da8dc09355b747831267aeee57cf7ac82d7da748cb97c110e7853e14b90835d0965baa3bc7ca7ef53d4225b5afa98062fc141f28c2c7b42ecda7b5b593ded6",
    "identity": "636eb6d79cfba3cb92ac4799",
    "scopes": "realm,own",
    "roles": "admin,manage,user",
    "data": {
        "my_field_1": "my_value_1",
        "email": "optional@email.com"
    },
    "created_at": 1668200151426,
    "active": true,
    "deleted": false
}

List available API credits

Use this API call to check currently available API credits for this Realm.

echo "create admin user for Realm id=634b5be77f6a7b0be52dffcc"

curl --location --request GET 'https://api.orangepill.cloud/v1/realms/634b5be77f6a7b0be52dffcc/credits/available' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'

In response we will get number of available credits.

{
    "credits": 245033
}
here
here