Skip to main content
Version: 1.2.0-1.3.0

Basics - Proxy

Using the proxy, partner services can be delegated to manage digital items (for example, sealing or unsealing digital items or canceling the sale of digital items) in the user’s DOSI account.

Connection info

Development environmentDOSI SDK base URI
Productionhttps://sdk-api.dosi.world

How to use

Follow the next steps to obtain delegation (that is, setting the proxy) for digital items from the user's DOSI account.

  1. Call the endpoint of the Request proxy setup API.
  2. Move to redirectUri in the response from Step 1.
    • This address leads to a page where users can enter a PIN code to authenticate their DOSI account.
    • When the user enters a PIN code, it automatically moves to redirectUri provided as a body parameter when calling the Request proxy setup API.
  3. Call the endpoint of the Commit proxy setup request API using sessionToken in the response from Step 1 as a path parameter.

This completes the proxy setup.

You only need to set up the proxy once for each account.

Get proxy status

Checks if the user's DOSI account delegated digital item management (that is, proxy setting).

GET {DOSI SDK base URI}/v1/wallets/{walletAddress}/contracts/{contractId}/proxy

Path

Name
TypeDescription
walletAddressstring

Wallet address of the user's DOSI account. Get the endpoint by retrieving extended user profile.

contractIdstring

Contract ID of the service requiring the proxy

Query

None

Body

None

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --location --request GET 'https://sdk-api.dosi.world/v1/wallets/link1xx...zzz/contracts/ab...cd/proxy' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'

Request proxy setup

Requests the user's DOSI account to set up a proxy.

POST {DOSI SDK base URI}/v1/wallets/{walletAddress}/contracts/{contractId}/proxy

Path

Name
TypeDescription
walletAddressstring

Wallet address of the user's DOSI account

contractIdstring

Contract ID of the service requiring the proxy

Query

None

Body

Name
TypeDescription
redirectUristring

Landing URI after user authorization

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/wallets/link1xx...zzz/contracts/ab...cd/proxy' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"redirectUri": "https://....com/xxx"
}'

Get user authorization status during proxy setup

Gets the user's authorization status while setting up the proxy to the user's DOSI account.

GET {DOSI SDK base URI}/v1/proxy/requests/{sessionToken}

Path

Name
TypeDescription
sessionTokenstring

sessionToken received after calling the proxy setup request

Query

None

Body

None

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request GET 'https://sdk-api.dosi.world/v1/proxy/requests/xx...cc' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'

Commit proxy setup request

Commits the task of designating the proxy to the user's DOSI account.

POST {DOSI SDK base URI}/v1/proxy/requests/{sessionToken}/commit

Path

Name
TypeDescription
sessionTokenstring

sessionToken received after calling the proxy setup request

Query

None

Body

Name
TypeDescription
Required
txIdstring

Identifier provided to track the API request. Use the UUID string (case-insensitive) defined by RFC 9562.

The identifier is used to check the transaction after sending a request to the DOSI SDK server. If not specified, the DOSI SDK server generates an identifier and returns it in the response.

Specify this value if you want to check the result even if you do not receive a server response due to network issues.

Headers
  • Authorization: Basic <Base64-encoded 'DOSI channel ID:secret'>
  • Content-Type: application/json

Request examples

curl --request POST 'https://sdk-api.dosi.world/v1/proxy/requests/xx...cc/commit' \
--header 'Authorization: Basic xxxxxxxx' \
--header 'Content-Type: application/json'