Integration
Last updated
Last updated
Debank Connect is based on the OAuth2.0 authorization standard protocol. With DeBank Connect, enable Web3 users to effortlessly sign in your Dapp via DeBank. Once they grant authorization, access their account name/avatar, on-chain portfolio data, and social following data.
Log in to Official dashboard, click the Apps tab on the navbar, and click Create New App.
Once you have finished creating the App, follow the instructions to complete the validation of the App.
Click "Create Client"
After the creation, save the Client ID and Client Secret for subsequent Integration.
DeBank Connect currently only supports OAuth 2.0 Authorization Code Grant.
OAuth 2.0 Authorization Code Grant:
The DAPP guides the user to the DeBank Connect authorization page
Example of Authorization Redirect URL:
Description of DeBank Connect Authorization Page URL Parameters
The user can decide whether to authorize the Web service application. If authorization is not agreed, the process terminates. If authorization is agreed, the authorization endpoint is triggered. Then redirect to the "redirect_uri"
Example of redirect uri:
The dApp server side obtains access token and refresh token through authorization code.
DeBankConnect API for access token and refresh_token.
Response:
Example:
The DAPP service refreshes the access_token by refresh_token.
Response:
Example:
Paramater | Requierd | Description |
---|---|---|
Scope | |
---|---|
Paramater | Required | Description |
---|---|---|
Paramater | Required | Description |
---|---|---|
Paramater | Required | Description |
---|---|---|
Paramater | Required | Description |
---|---|---|
Paramater | Required | Description |
---|---|---|
scope | Link |
---|---|
client_id
Yes
Third party identification credentials
redirect_uri
Yes
After the authorization process is complete, it redirects to the dapp with the code.
scope
No
The required scope of access for dApp application.
response_type
No
Authorization code grant mode, default is "code".
state
No, Recommed
If this parameter is included in the request, the authentication server will return it exactly as it is during the redirection, in order to prevent replay attacks.
user:base:read
User base info
user:chain:read
User on-chain portfolio data
user:social:read
User social info
code
Yes
Authorization code. After the user grants authorization, DeBank connect will redirect to the dApp with the code.
state
No, Recommed
If this parameter is included in the request, the authentication server will return it exactly as it is during the redirection, in order to prevent replay attacks.
code
Yes
Authorization code
redirect_uri
Yes
The link for the redirection when the user is authorized, must be consistent.
grant_type
Yes
Authorization code mode, default is "authorization_code".
access_token
Yes
Access Token
expires_in
Yes
Expire time
refresh_token
Yes
Refresh Token
scope
Yes
The required scope of access for dApp application
token_type
Yes
The authentication method for the access token.
refresh_token
Yes
Refresh Token
grant_type
Yes
Authorization code mode, default is "refresh_token".
access_token
Yes
Access Token
expires_in
Yes
Expire time
refresh_token
Yes
Refresh Token
scope
Yes
The required scope of access for dApp application
token_type
Yes
The authentication method for the access token.
user:base:read
user:chain:read
user:social:read