LogoLogo
  • 🚀DeSo Vision
  • 🪙DeSo Tokenomics
    • No Equity, Just Coins and Code
    • Current DESO Supply
    • Initial DESO Distribution
    • DESO Sinks
    • The BMF: Burn-Maximizing Fee Mechanism
    • Designed for the End-Game
  • 🏛️DeSo Governance
  • ⭐DeSo Tutorial (Build Apps)
  • 🖥️Node Architecture Overview
    • Setup a Node & Frontend Locally
    • Making Your First Changes
  • 📅DeSo Roadmap
  • 🔍DeSo Block Explorer
  • 💸DeSo Wallet
  • 💬DeSo Chat Protocol
  • 👽Openfund
  • 👀Focus
  • 🛠️DeSo Tech Stack
  • 🌐DeSo Applications
  • DeSo Blockchain
    • 1️⃣Bare Metal
    • 2️⃣Scaling Roadmap
    • 3️⃣Content Moderation
    • 4️⃣Infinite-State
    • 5️⃣On-Chain Data
    • 6️⃣Smart Services
    • 7️⃣User Security
  • DeSo Features
    • 1️⃣Associations
    • 2️⃣Creator Coins
    • 3️⃣Feeds & Moderation
    • 4️⃣Social NFTs
    • 5️⃣Social Tipping
  • DeSo Identity
    • 1️⃣Identity: Overview
      • Core Concepts
      • Mobile Integration
    • 2️⃣Identity: iFrame API
      • Overview
      • Endpoints
    • 3️⃣Identity: Window API
      • Overview
      • Endpoints
  • DESO FRONTEND
    • 1️⃣Frontend: Get Started
    • 2️⃣Frontend: React Example
  • DESO BACKEND
    • 1️⃣Backend: Config
      • Onboarding
      • Phone Number Verification
      • Global State
      • Admins
      • Web Security
      • Media
        • Images
        • Videos
      • Hot Feed
      • Selling $DESO
        • Wyre - Buy with USD
        • Buy with BTC
        • Buy with ETH
      • Analytics
      • Emails
      • Supply Monitoring
    • 2️⃣Construct: API
      • Social Transactions API
      • NFT Transactions API
      • Financial Transactions API
      • Derived Keys Transaction API
      • DeSo Tokens Transactions API
      • Associations Transactions API
      • Access Groups API
    • 3️⃣Data: API
      • Admin Endpoints
      • Associations Endpoints
      • DeSo Tokens Endpoints
      • Media Endpoints
      • Miner Endpoints
      • Notification Endpoints
      • NFT Endpoints
      • Social Endpoints
      • Referral Endpoints
      • Tutorial Endpoints
      • Meta Data Endpoints
      • Transaction Spending Limits Endpoints
      • User Endpoints
      • Post Endpoints
      • Messages Endpoints
      • Access Group Endpoints
    • 4️⃣Transactions: API
  • DeSo Exchange Listings
    • 1️⃣Exchange Listing: API
  • DeSo Nodes
    • 2️⃣Node: Setup
    • 3️⃣Node: Staying Up-To-Date
    • 4️⃣Node: FAQ
  • DESO VALIDATORS
    • 1️⃣Run a Validator
  • Openfund
    • What is Openfund?
    • Openfund Tokenomics
    • Openfund Governance
    • Algorithmic Trading
      • The DeSo Python SDK
    • The DeSo Python SDK
      • Getting Help from the Community
      • Creating DeSo Testnet Accounts
      • Debugging Tips and Code Walkthrough
      • Write Blockchain Bots with AI
      • Market-Making Bots
      • Social AI Agents
      • AI-Generating Your Code
    • How Do the Advanced AMMs Work?
  • Focus
    • The Crypto Social Network
    • Next-Generation Token Mechanics
      • Launching Your Token
      • How the Order-Book AMMs Work
    • Crypto-Native Monetization
    • Focus Tokenomics
    • The Social Airdrop
    • Decentralizing Social Media
  • Contact And Media
    • ☀️DeSo Website
    • 📑DeSo Blog
    • 💻DeSo Github
    • 💎DeSo Diamond
    • 🐦DeSo Twitter
    • 📺DeSo YouTube
    • 📬Contact US
    • ⚠️Reporting an Account or Post
  • 中文
    • 什么是DeSo? (What is DeSo?)
    • 愿景 (The Vision)
Powered by GitBook
On this page
  • Get User Direct Message Threads Ordered by Timestamp
  • Get Paginated Messages for a Direct Message Thread
  • Get User Group Chat Threads Ordered by Timestamp
  • Get Paginated Messages For Group Chat Thread
  • Get All User Message Threads

Was this helpful?

  1. DESO BACKEND
  2. Data: API

Messages Endpoints

PreviousPost EndpointsNextAccess Group Endpoints

Last updated 2 years ago

Was this helpful?

Get User Direct Message Threads Ordered by Timestamp

POST /api/v0/get-user-dm-threads-ordered-by-timestamp

Get User Direct Message Threads Ordered by Timestamp returns an array of NewMessageEntryResponse objects for the public key provided in the request body. Each NewMessageEntryResponse object represents the most recent message each in DM conversation a user has. This is useful for showing a list of DM conversations in a user's inbox. The first NewMessageEntryResponse object is the most recent conversation and the last one is the old.

Additionally, a map of public key to objects for convenience so you don't need to make an extra request to get profile entry responses for the public keys in the response.

Endpoint implementation in .

Request Body

Name
Type
Description

UserPublicKeyBase58Check*

String

Public key of the user for whom we want to fetch all DM conversations

{
  "MessageThreads": [
    {
      "ChatType": "DM",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKUr3CEsbbg95oH6nauciz3HKxoExX6DgpcFskffGFFXHy5mtrvt",
        "AccessGroupPublicKeyBase58Check": "tBCKVSfJQqcm88YQANuuRDqxHGRZ6pERLmgG2YsbuTJQ66CypHXc2P",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKVNhD9Kn6WzxT1EdgR3Tf3Yop6CXQSDZnvMLbST6C33DTbsnku4",
        "AccessGroupKeyName": "default-key"
      },
      "MessageInfo": {
        "EncryptedText": "04bec21d8b7ebb8bef474b01adf6a128d4984ba1f2f1f03abeb1612c78477cac0e6bdba24924631a9b4a795d9fd5e82dac8306a0193ec0c8c8c8cee9ca8f8313ec0d393178c1241c00e9aafa380813d0296aefd78eef8eff974dae964b330d3f9e838b1848086c98c1778f434bd6569d7d9de09eb6102fff028f8ca98304a3f7c06833b178f358de11072a05a07f7d77984321",
        "TimestampNanos": 1674622684987966700,
        "TimestampNanosString": "1674622684987966645",
        "ExtraData": null
      }
    }
  ],
  "PublicKeyToProfileEntryResponse": {
    "tBCKUr3CEsbbg95oH6nauciz3HKxoExX6DgpcFskffGFFXHy5mtrvt": null,
    "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2": {
      "PublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
      "Username": "cloutchaser",
      "Description": "",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 1124400018,
        "NumberOfHolders": 1,
        "CoinsInCirculationNanos": 9999331379,
        "CoinWatermarkNanos": 9999331379,
        "BitCloutLockedNanos": 1124400018
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 3,
        "CoinsInCirculationNanos": "0xd96914214a6b400",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "profile_owner_only"
      },
      "CoinPriceDeSoNanos": 337342594,
      "CoinPriceBitCloutNanos": 337342594,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "BlogSlugMap": "{\"da39a3ee5e\":\"7f9b91cd09ed5cefa0e2bbe2d70698dc665f3d4d31ee2a3a64c91ead3552ed51\"}"
      },
      "DESOBalanceNanos": 5914499708,
      "BestExchangeRateDESOPerDAOCoin": 0
    }
  }
}

Get Paginated Messages for a Direct Message Thread

POST /api/v0/get-paginated-messages-for-dm-thread

Get Paginated Messages For DM Thread returns an array of NewMessageEntryResponse objects based on the conversation defined in the request body. Each NewMessageEntryResponse object represent a message in the a DM conversation. This is useful for showing all messages in a conversation. This first NewMessageEntryResponse object is the most recent message and the last one is the oldest. This endpoint supports pagination.

Request Body

Name
Type
Description

UserGroupOwnerPublicKeyBase58Check*

String

Public key of one of the users in a DM conversation

UserGroupKeyName*

String

Access group key name of UserGroupOwnerPublicKeyBase58Check in the DM conversation

PartyGroupOwnerPublicKeyBase58Check*

String

Public key of the other user in a DM conversation

PartyGroupKeyName*

String

Access group key name of PartyGroupOwnerPublicKeyBase58Check in the DM conversation

StartTimestampString

String

String version of a timestamp in nanos. This defines the start point of the page. Messages newer than this timestamp are excluded.

To get the most recent (but not in the future) messages, set TimestampNanosString to (Date.now()*1e6).toString()

To get the next page of messages, take TimestampNanosString from the last NewMessageEntryResponse object in the previous page's response.

StartTimestamp

uint64

Timestamp in nanos. This is less preferred than passing StartTimestamp string as JSON encoding and decoding can lose precision on these values.

MaxMessagesToFetch

int

Maximum number of messages to fetch. You will always receive this amount of messages or fewer.

{
  "ThreadMessages": [
    {
      "ChatType": "DM",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV",
        "AccessGroupPublicKeyBase58Check": "tBCKYe8fNF8pk8Gn3hfD7uYd34a7bz8NVeQmcxaSvqsogtzFkTWEEV",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKVv5H1Gz6RTRhjxJwdzcfwfwoUo8b4PYWSKkayG4dy76Jsjt2Ro",
        "AccessGroupPublicKeyBase58Check": "tBCKYdH5NpkaafHkU6foem4qx5rDDd9N8nCXXPUecTfHetEarueJJ6",
        "AccessGroupKeyName": "default-key"
      },
      "MessageInfo": {
        "EncryptedText": "043aaf6732c852ce7b91fbf8556d8a3a4a237852a3550f3e7617b5f5514d8873f152de0fa1157b32f39e42348876852d0ab641f05e1b9775088c635a480952e9ba4b55909cbb0aa073c9bcd09d9c3a4a419cd488d0290dd0b71cf8700bb8728854be062aeafccb5b35a937b48b4e85ead1fec6",
        "TimestampNanos": 1675459724661132500,
        "TimestampNanosString": "1675459724661132641",
        "ExtraData": null
      }
    }
  ],
  "PublicKeyToProfileEntryResponse": {
    "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV": {
      "PublicKeyBase58Check": "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV",
      "Username": "DeSoMessagingDemo",
      "Description": "The coolest demo on the planet",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 178459749,
        "NumberOfHolders": 3,
        "CoinsInCirculationNanos": 3387141072,
        "CoinWatermarkNanos": 3650090519,
        "BitCloutLockedNanos": 178459749
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 7,
        "CoinsInCirculationNanos": "0x152e2c1689476aa1d680",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "permanently_unrestricted"
      },
      "CoinPriceDeSoNanos": 158062297,
      "CoinPriceBitCloutNanos": 158062297,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "DAOPublicKeysPurchased": "tBCKWGGQhAwaH1ZhEFbLA1WoaNeErr3qQuqXSw3LZB3R357m1vkS1E,tBCKY3nVGx7M9FT7h1RcpJyWSUpnjEzJQRXSqwAPaqcAF42W9TEwt8,tBCKYdgcgaCgu53xhwT4J2dyfnjP8M1pXogEgeP2rgp2qDhdWhkMpd",
        "DaoDaoURL": "",
        "DerivedPublicKey": "tBCKXpjxNnoe9x6EBVJTdcrTu9NS2mkJ3va7HY9a52CrEPXZQGWfsk",
        "DiscordURL": "",
        "DisplayName": "",
        "FeaturedImageURL": "",
        "LargeProfilePicURL": "",
        "MarkdownDescription": "2320776f6f0a686f6f",
        "TelegramURL": "",
        "TwitterURL": "",
        "WebsiteURL": ""
      },
      "DESOBalanceNanos": 719569565,
      "BestExchangeRateDESOPerDAOCoin": 0.07468259895444361
    },
    "tBCKVv5H1Gz6RTRhjxJwdzcfwfwoUo8b4PYWSKkayG4dy76Jsjt2Ro": {
      "PublicKeyBase58Check": "tBCKVv5H1Gz6RTRhjxJwdzcfwfwoUo8b4PYWSKkayG4dy76Jsjt2Ro",
      "Username": "lazynina",
      "Description": "",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 6834043772,
        "NumberOfHolders": 1,
        "CoinsInCirculationNanos": 5448485463,
        "CoinWatermarkNanos": 5448485463,
        "BitCloutLockedNanos": 6834043772
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 2,
        "CoinsInCirculationNanos": "0x1794bb7c13520200",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "profile_owner_only"
      },
      "CoinPriceDeSoNanos": 3762905032,
      "CoinPriceBitCloutNanos": 3762905032,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "DAOPublicKeysPurchased": "tBCKY3nVGx7M9FT7h1RcpJyWSUpnjEzJQRXSqwAPaqcAF42W9TEwt8",
        "DerivedPublicKey": "tBCKUoDRjbVj2JMWkMqiDzvbFrSGSdD9nGty4YXsNu4zZW5cySUrbG",
        "DiscordURL": "",
        "DisplayName": "",
        "FeaturedImageURL": "",
        "LargeProfilePicURL": "",
        "MarkdownDescription": "",
        "TelegramURL": "",
        "TwitterURL": "",
        "WebsiteURL": ""
      },
      "DESOBalanceNanos": 16516822968844,
      "BestExchangeRateDESOPerDAOCoin": 0
    }
  }
}

Get User Group Chat Threads Ordered by Timestamp

POST /api/v0/get-user-group-chat-threads-ordered-by-timestamp

Get User Group Chat Threads Ordered by Timestamp returns an array of NewMessageEntryResponse objects for the public key provided in the request body. Each NewMessageEntryResponse object represents the most recent message each in a group chat a user has. This is useful for showing a list of group chats in a user's inbox. The first NewMessageEntryResponse object is the most recent conversation and the last one is the oldest.

Request Body

Name
Type
Description

UserPublicKeyBase58Check*

String

Public key of the user for whom we want to fetch all DM conversations

{
  "MessageThreads": [
    {
      "ChatType": "GroupChat",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKVNhD9Kn6WzxT1EdgR3Tf3Yop6CXQSDZnvMLbST6C33DTbsnku4",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKWmLgvkMGkMuQ47Jhm8aYMhYMokXpFQTnhqBH7JXQsTuX8AYSs7",
        "AccessGroupKeyName": "a super cool groupchat"
      },
      "MessageInfo": {
        "EncryptedText": "04e8cfc4ebd0f55f612e3779e0a224c702ad89acf33c4499c3f82544f2c0ff295e27dd008f6854abe0c6109ec26b1bbaaedc1e4fa7c7f1dc0dff0cfcc028ddf9fab5e400559e5f280a04442d46168ac67061bcb598a27baa50bf202127397070cbbac68401921777a16017089b6b7f77a01447ff96",
        "TimestampNanos": 1675454352913804800,
        "TimestampNanosString": "1675454352913804789",
        "ExtraData": null
      }
    }
  ],
  "PublicKeyToProfileEntryResponse": {
    "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2": {
      "PublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
      "Username": "cloutchaser",
      "Description": "",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 1124400018,
        "NumberOfHolders": 1,
        "CoinsInCirculationNanos": 9999331379,
        "CoinWatermarkNanos": 9999331379,
        "BitCloutLockedNanos": 1124400018
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 3,
        "CoinsInCirculationNanos": "0xd96914214a6b400",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "profile_owner_only"
      },
      "CoinPriceDeSoNanos": 337342594,
      "CoinPriceBitCloutNanos": 337342594,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "BlogSlugMap": "{\"da39a3ee5e\":\"7f9b91cd09ed5cefa0e2bbe2d70698dc665f3d4d31ee2a3a64c91ead3552ed51\"}"
      },
      "DESOBalanceNanos": 5914499708,
      "BestExchangeRateDESOPerDAOCoin": 0
    }
  }
}

Get Paginated Messages For Group Chat Thread

POST /api/v0/get-paginated-messages-for-group-chat-thread

Get Paginated Messages For Group Chat Thread returns an array of NewMessageEntryResponse objects based on the group chat defined in the request body. Each NewMessageEntryResponse object represent a message in the group chat. This is useful for showing all messages in a conversation. This first NewMessageEntryResponse object is the most recent message and the last one is the oldest. This endpoint supports pagination.

Request Body

Name
Type
Description

UserPublicKeyBase58Check*

String

Public key of the access group owner who owns this group chat.

AccessGroupKeyName*

String

Name of the access group for which we want to fetch messages.

StartTimestampString

String

String version of a timestamp in nanos. This defines the start point of the page. Messages newer than this timestamp are included. To get the most recent messages of the conversation, pass the current timestamp in nanoseconds converted to a string (not formatted as a timestamp).

To get the most recent (but not in the future) messages, set TimestampNanosString to (Date.now()*1e6).toString()

To get the next page of messages, take TimestampNanosString from the last NewMessageEntryResponse object in the previous page's response.

StartTimestamp

uint64

Timestamp in nanos. This is less preferred than passing StartTimestamp string as JSON encoding and decoding can lose precision on these values.

MaxMessagesToFetch*

int

Maximum number of messages to fetch. You will always receive this amount of messages or fewer.

{
  "GroupChatMessages": [
    {
      "ChatType": "GroupChat",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV",
        "AccessGroupPublicKeyBase58Check": "tBCKYe8fNF8pk8Gn3hfD7uYd34a7bz8NVeQmcxaSvqsogtzFkTWEEV",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV",
        "AccessGroupPublicKeyBase58Check": "tBCKYGaV4ePH88zeVCuj4ywWVN8xf6TDuRThuow4d7dsDYD2A9u8g8",
        "AccessGroupKeyName": "chatdemo"
      },
      "MessageInfo": {
        "EncryptedText": "0481860551243b3524f87a62e9d8704539d20869124f01fccfdc458879f3d42d8db05ac605fda1a2ba6a05d72511758a907c91a7c362359645425bd7e2e4137590a00f7f527ca93744c50b8a8d7b7347753a106e16cf18b47d373533c73c6da84f41b0ad4e59b4bed7d75935a78d320361c3b8bcae24ed743d9549e5a38a2f934007f848db152f55f6a2280a407862cd657f42817928d816f873e4",
        "TimestampNanos": 1675457690291604500,
        "TimestampNanosString": "1675457690291604407",
        "ExtraData": null
      }
    }
  ],
  "PublicKeyToProfileEntryResponse": {
    "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV": {
      "PublicKeyBase58Check": "tBCKVERmG9nZpHTk2AVPqknWc1Mw9HHAnqrTpW1RnXpXMQ4PsQgnmV",
      "Username": "DeSoMessagingDemo",
      "Description": "The coolest demo on the planet",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 178459749,
        "NumberOfHolders": 3,
        "CoinsInCirculationNanos": 3387141072,
        "CoinWatermarkNanos": 3650090519,
        "BitCloutLockedNanos": 178459749
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 7,
        "CoinsInCirculationNanos": "0x152e2c1689476aa1d680",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "permanently_unrestricted"
      },
      "CoinPriceDeSoNanos": 158062297,
      "CoinPriceBitCloutNanos": 158062297,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "DAOPublicKeysPurchased": "tBCKWGGQhAwaH1ZhEFbLA1WoaNeErr3qQuqXSw3LZB3R357m1vkS1E,tBCKY3nVGx7M9FT7h1RcpJyWSUpnjEzJQRXSqwAPaqcAF42W9TEwt8,tBCKYdgcgaCgu53xhwT4J2dyfnjP8M1pXogEgeP2rgp2qDhdWhkMpd",
        "DaoDaoURL": "",
        "DerivedPublicKey": "tBCKXpjxNnoe9x6EBVJTdcrTu9NS2mkJ3va7HY9a52CrEPXZQGWfsk",
        "DiscordURL": "",
        "DisplayName": "",
        "FeaturedImageURL": "",
        "LargeProfilePicURL": "",
        "MarkdownDescription": "2320776f6f0a686f6f",
        "TelegramURL": "",
        "TwitterURL": "",
        "WebsiteURL": ""
      },
      "DESOBalanceNanos": 719570083,
      "BestExchangeRateDESOPerDAOCoin": 0.07468259895444361
    }
  }
}

Get All User Message Threads

POST /api/v0/get-all-user-message-threads

Get All User Message Threads Group returns an array of NewMessageEntryResponse objects for the public key provided in the request body. Each NewMessageEntryResponse object represents the most recent message each in a conversation (DM or group chat) a user has. This is useful for showing a list of all conversations in a user's inbox. The first NewMessageEntryResponse object is the most recent conversation and the last one is the oldest.

Request Body

Name
Type
Description

UserPublicKeyBase58Check*

String

Public key of the user for whom we want to fetch all conversations

{
  "MessageThreads": [
    {
      "ChatType": "GroupChat",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKVNhD9Kn6WzxT1EdgR3Tf3Yop6CXQSDZnvMLbST6C33DTbsnku4",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKWmLgvkMGkMuQ47Jhm8aYMhYMokXpFQTnhqBH7JXQsTuX8AYSs7",
        "AccessGroupKeyName": "a super cool groupchat"
      },
      "MessageInfo": {
        "EncryptedText": "04e8cfc4ebd0f55f612e3779e0a224c702ad89acf33c4499c3f82544f2c0ff295e27dd008f6854abe0c6109ec26b1bbaaedc1e4fa7c7f1dc0dff0cfcc028ddf9fab5e400559e5f280a04442d46168ac67061bcb598a27baa50bf202127397070cbbac68401921777a16017089b6b7f77a01447ff96",
        "TimestampNanos": 1675454352913804800,
        "TimestampNanosString": "1675454352913804789",
        "ExtraData": null
      }
    },
    {
      "ChatType": "DM",
      "SenderInfo": {
        "OwnerPublicKeyBase58Check": "tBCKUr3CEsbbg95oH6nauciz3HKxoExX6DgpcFskffGFFXHy5mtrvt",
        "AccessGroupPublicKeyBase58Check": "tBCKVSfJQqcm88YQANuuRDqxHGRZ6pERLmgG2YsbuTJQ66CypHXc2P",
        "AccessGroupKeyName": "default-key"
      },
      "RecipientInfo": {
        "OwnerPublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
        "AccessGroupPublicKeyBase58Check": "tBCKVNhD9Kn6WzxT1EdgR3Tf3Yop6CXQSDZnvMLbST6C33DTbsnku4",
        "AccessGroupKeyName": "default-key"
      },
      "MessageInfo": {
        "EncryptedText": "04bec21d8b7ebb8bef474b01adf6a128d4984ba1f2f1f03abeb1612c78477cac0e6bdba24924631a9b4a795d9fd5e82dac8306a0193ec0c8c8c8cee9ca8f8313ec0d393178c1241c00e9aafa380813d0296aefd78eef8eff974dae964b330d3f9e838b1848086c98c1778f434bd6569d7d9de09eb6102fff028f8ca98304a3f7c06833b178f358de11072a05a07f7d77984321",
        "TimestampNanos": 1674622684987966700,
        "TimestampNanosString": "1674622684987966645",
        "ExtraData": null
      }
    }
  ],
  "PublicKeyToProfileEntryResponse": {
    "tBCKUr3CEsbbg95oH6nauciz3HKxoExX6DgpcFskffGFFXHy5mtrvt": null,
    "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2": {
      "PublicKeyBase58Check": "tBCKW665XZnvVZcCfcEmyeecSZGKAdaxwV2SH9UFab6PpSRikg4EJ2",
      "Username": "cloutchaser",
      "Description": "",
      "IsHidden": false,
      "IsReserved": false,
      "IsVerified": false,
      "Comments": null,
      "Posts": null,
      "CoinEntry": {
        "CreatorBasisPoints": 10000,
        "DeSoLockedNanos": 1124400018,
        "NumberOfHolders": 1,
        "CoinsInCirculationNanos": 9999331379,
        "CoinWatermarkNanos": 9999331379,
        "BitCloutLockedNanos": 1124400018
      },
      "DAOCoinEntry": {
        "NumberOfHolders": 3,
        "CoinsInCirculationNanos": "0xd96914214a6b400",
        "MintingDisabled": false,
        "TransferRestrictionStatus": "profile_owner_only"
      },
      "CoinPriceDeSoNanos": 337342594,
      "CoinPriceBitCloutNanos": 337342594,
      "UsersThatHODL": null,
      "IsFeaturedTutorialWellKnownCreator": false,
      "IsFeaturedTutorialUpAndComingCreator": false,
      "ExtraData": {
        "BlogSlugMap": "{\"da39a3ee5e\":\"7f9b91cd09ed5cefa0e2bbe2d70698dc665f3d4d31ee2a3a64c91ead3552ed51\"}"
      },
      "DESOBalanceNanos": 5914499708,
      "BestExchangeRateDESOPerDAOCoin": 0
    }
  }
}

Additionally, a map of public key to objects for convenience so you don't need to make an extra request to get profile entry responses for the public keys in the response.

Endpoint implementation in .

Additionally, a map of public key to objects for convenience so you don't need to make an extra request to get profile entry responses for the public keys in the response.

Endpoint implementation in .

Additionally, a map of public key to objects for convenience so you don't need to make an extra request to get profile entry responses for the public keys in the response.

Endpoint implementation in .

Additionally, a map of public key to objects for convenience so you don't need to make an extra request to get profile entry responses for the public keys in the response.

Endpoint implementation in .

3️⃣
backend
backend
backend
backend
backend
ProfileEntryResponse
ProfileEntryResponse
ProfileEntryResponse
ProfileEntryResponse
ProfileEntryResponse