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 environment | DOSI SDK base URI |
---|---|
Production | https://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.
- Call the endpoint of the Request proxy setup API.
- 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.
- 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).
Path
Name | Type | Description |
---|---|---|
walletAddress | string | Wallet address of the user's DOSI account. Get the endpoint by retrieving extended user profile. |
contractId | string | Contract ID of the service requiring the proxy |
Query
None
Body
None
- 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.
Path
Name | Type | Description |
---|---|---|
walletAddress | string | Wallet address of the user's DOSI account |
contractId | string | Contract ID of the service requiring the proxy |
Query
None
Body
Name | Type | Description |
---|---|---|
redirectUri | string | Landing URI after user authorization |
- 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.
Path
Name | Type | Description |
---|---|---|
sessionToken | string |
|
Query
None
Body
None
- 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.
Path
Name | Type | Description |
---|---|---|
sessionToken | string |
|
Query
None
Body
Name | Type | Description | Required |
---|---|---|---|
txId | string | 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. |
- 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'