Endpoints
This page contains the endpoints for the Authorization Flow.
GET https://de.xyz/oauth/authorize
Parameters:
response_type
- Set to code for authorization_code grant flow.client_id
- Your application's client identifier.redirect_uri
- URL to redirect users after authorization (e.g., https://degenpicks.xyz/oauth/callback (opens in a new tab)).state
- Random string generated by your application for verification.code_challenge
- Either a plain or S256 generated code challenge.code_challenge_method
- Either plain or S256.
POST /oauth/token
This endpoint is used to exchange the authorization code for an access token.
Full URL: https://api.oauth.dustlabs.com/oauth/token
Parameters:
grant_type
- Set to authorization_code.code
- The authorization code received from the authorization endpoint.code_verifier
- The code verifier used to generate the code challenge.client_id
- Your application's client identifier.client_secret
- Your application's client secret (Optional).redirect_uri
- URL to redirect users after authorization (e.g., https://degenpicks.xyz/oauth/callback (opens in a new tab)).
Response
{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "example-access-token",
"refresh_token": "example-refresh-token"
"scope": "profile:read"
}
GET /profile
This endpoint returns the user's profile based on the approved scopes.
Full URL: https://api.oauth.dustlabs.com/profile
Response
{
"success": true,
"profile": {
"id": "123456789",
"name": "example",
"imageUrl": "https://example.com/image.png",
"description": "example",
"website": "https://example.com",
"socials": {
"telegramId": "123456789",
"telegramUsername": "example",
"discordId": "123456789",
"discordUsername": "example#1234",
"twitterId": "123456789",
"twitterHandle": "example",
"twitterUsername": "example",
"steamId": "123456789",
"steamUsername": "example",
},
"collections": [
{
"network": "ETHEREUM",
"contract": "0xEXAMPLE",
"tokens": [
{
"wallet": "0x00000000000000000000",
"tokenId": 1,
"staked": false
}
],
}
],
"wallets": [
{
"network": "ETHEREUM",
"address": "0x00000000000000000000",
},
{
"network": "SOLANA",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
},
{
"network": "BITCOIN",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
}
],
"dust": {
"amount": 26745.011707103,
"preciseAmount": "26745011707103",
"decimals": 9,
}
}
}
GET /profile/wallets
This endpoint returns the wallets associated with the user and requires the wallets:read
scope.
Full URL: https://api.oauth.dustlabs.com/profile/wallets
Response
{
"success": true,
"wallets": [
{
"network": "ETHEREUM",
"address": "0x00000000000000000000",
},
{
"network": "SOLANA",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
},
{
"network": "BITCOIN",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
}
]
}
GET /profile/collections
This endpoint returns the collections associated with the user and requires the collections:read
scope.
Full URL: https://api.oauth.dustlabs.com/profile/collections
Response
{
"success": true,
"collections": [
{
"network": "ETHEREUM",
"contract": "0xEXAMPLE",
"tokens": [
{
"wallet": "0x00000000000000000000",
"tokenId": 1,
"staked": false
}
],
}
]
}
GET /profile/socials
This endpoint returns the socials associated with the user and requires the socials:read
scope.
Full URL: https://api.oauth.dustlabs.com/profile/socials
Response
{
"success": true,
"socials": {
"telegramId": "123456789",
"telegramUsername": "example",
"discordId": "123456789",
"discordUsername": "example#1234",
"twitterId": "123456789",
"twitterHandle": "example",
"twitterUsername": "example",
"steamId": "123456789",
"steamUsername": "example",
}
}
GET /profile/dust
This endpoint returns the dust associated with the user and requires the dust:read
scope.
Full URL: https://api.oauth.dustlabs.com/profile/dust
Response
{
"success": true,
"dust": {
"amount": 26745.011707103,
"preciseAmount": "26745011707103",
"decimals": 9,
}
}