De-Link User

Method is used to disconnect a user in your application from the Dapi by invalidating their access token.

👍

Pre-Requirement

You have obtained user's permanent access token from Exchange Token endpoint

To read more about how to obtain access token refer to Exchange Token

Request

https://api.dapi.com/v2/users/DelinkUser

Headers

Parameter

Type

Description

Authorization
REQUIRED

String

Set type to bearer token and the value to the accessToken obtained using the Exchange Token request.

Body Parameters

Parameter

Type

Description

appSecret
REQUIRED

String

Private token generated at application creation.

userSecret
REQUIRED

String

User secret returned during the successful authentication in Connect Layer

Request Example

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",  "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3",
  "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s="
}

Response

📘

Note

Your responses may differ from those listed below on a case-by-case basis.

Parameter

Type

Description

success

Boolean

Returns true if request is successful and false for all else.

msg

String

Descriptive message based on success parameter.

type

Enum

Type of error encountered

Is only returned if the request was successful

status

Enum

Status of the operation

done - Operation Completed

failed - Operation Failed

user_input_required - Pending User Input

initialized - Operation In Progress

*For further explanation see Operation Statuses

Response Example

{
    "status": "done",
    "success": true
}

Successful Request / Response

Successful Request

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14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wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s="
}

Successful Response

{
    "status": "done",
    "success": true
}

DeLinking an already DeLinked user Request / Response

Request

{
    "appSecret": "00bae841ad979345fca2e2585c000da7eac420504d189cf63315e7a6234d45c68dbd6fff749167292cd1475622805dce7a2b979db3c16e25a2897158ee63845b1043930ff603e19deb1d2d54ad9afc3d52df241d3c4e7286244a2f98a10212e38b2e9f8b0e3a7592702fa4358fb9103b93a26dd6bb92c2be0327ac054f14becc",   "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s=",
  "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s="
}

Response

{
    "msg": "Token delinked",
    "type": "UNAUTHORIZED",
    "success": false,
    "status": "failed"
}

Failed Request / Response - Invalid Token Specified

Request - Invalid Token Specified

{
    "appSecret": "invalid_token",
  "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s="
}

Response - Invalid Token Specified In Request

{
    "msg": "Invalid access token",
    "type": "UNAUTHORIZED",
    "success": false,
    "status": "failed"
}

📘

Note

For more information and detailed breakdown of possible errors, please see Errors.

Sample Code

curl --request POST \
  --url https://api.dapi.com/v2/users/DelinkUser \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBLZXkiOiI2ZWVlYmYxMjJkODk2NzEwYjdhN2U2MWI3ZTlhZTdlYTY4MDJjMTQyMDk1MjFlNTE1NDJkZDBmZmMxNzNmYTZmIiwiYXV0aG9yaXphdGlvbnMiOiJ7XCJhdXRoXCI6dHJ1ZSwgXCJpZFwiOnRydWUsIFwiYWNjb3VudHNcIjp0cnVlLCBcImJhbGFuY2VcIjp0cnVlLCBcInRyc1wiOnRydWUsIFwiYmVuZWZcIjp0cnVlLCBcImJlbmVmQ3JlYXRlXCI6dHJ1ZSwgXCJ0cmFuc2ZlclwiOnRydWUsIFwiYWNjVHlwZXNcIjpbXCJyZXRhaWxcIl0sIFwiY291bnRyaWVzXCI6W1wiVVNcIiwgXCJTQVwiLCBcIkFFXCIsIFwiRUdcIiwgXCJaQVwiLCBcIktXXCIsIFwiUEtcIl19IiwiaWF0IjoxNjE3NjIyOTA4LCJqdGkiOiJkN2I5ZGNlOS00NWU0LTQ0MWYtOGQ3ZS00MGY4NjI5MjkxZTIiLCJ1dWlkIjoiMjIxZjRlZDgtNDUyOS00Yjk4LTkzM2MtNWFjZTQ3YzQ1OTM2In0.g4uav3sD8TobNR2yEibz22idFhyDnMnHlzZL9UAyI2o' \
  --header 'Content-Type: application/json' \
  --data '{
    "appSecret": "5e6a5c184cb15c5bbdca720da21a9dc1586d89789d44a77bb468efb095f1190c",
    "userSecret":"R7bJbm8K06ky3OiGBe2QYJxlCiJay7b/Xgna2wsIwp6XBTpuXyJ8SdBY6VaXdsxvd/LJTpbiZDkvNMFQhrT/V0kgV62j9rgzgDqhBxdeKsQRpZ6oIp/6evrR67crnRdDuRF1HY+OJHAcSJ2vjo2yxJo4Y4uUAK0tpEV2IIKkifHgx1xlNuc/dDcvWlj42q0m9ai/bwwPKM/Q5CK3Upk8zJShzBcF7ms/xHev9quXxqtHjLiK0w5j0bGgc8+zX6W2gEhecmgWyj5D3G+5awDTTEnSIM596cr7YEquxh5l6spO+NgyAgp7xym73qz7HGfP5m32Dslqz/ylGG6juJHCc1ODQJrq4LnAKOCPwMnHF3NF9wA87cTWH1qXucwUGpi032cXjkfLJd2ITfcAZ0fBPlkpwYY+QIwVwkX7uWaGzCBKmyRNTj/UPgWVMUcJGE8SANhz0fGLbWWkUzrXLR8W6ml8vTsEWFT8sk3nwh8aRj422s+wsQ9VcM957SLlmoQl4dO8u90VJh7I8+i11GQp6mhvOHoHxO4O+ejZPQaz5MN6fAKoau8fHOPtyaPRZy+9XC3EVhGmvvsCS0gTXBtgUmiEFw2ZErYWqQGn4wryRqe38ThZs4+XZ6gUimBUVw+Bo19cRKkdRFEEHbMBJMyOkjgNfN1rZAGRkvPPio25x8s="
}'