🧍Check Single User

Learn how to use Airstack to check if a single user has XMTP or not.

By 0x Address

Simply use the following query to check if a user has XMTP or not:

query MyQuery($address: Identity!) {
  XMTPs(input: {blockchain: ALL, filter: {owner: {_eq: $address}}}) {
    XMTP {
      isXMTPEnabled
    }
  }
}

If a user has XMTP, then isXMTPEnabled will be true. Otherwise, the whole response object will be null.

Here's an example of a user that has an XMTP:

{
  "address": "0xa91c2d10a993d14f842d23b97f2ab3fdf6b5b9aa"
}

Here's an example of user the does not have any XMTP:

{
  "address": "0x5416e5dc14caa0950b2a24ede1eb0e97c360bcf5"
}

By ENS

With Airstack Identity API, you can simply swap the address input to any ENS names:

{
  "address": "vitalik.eth"
}

By Lens Profile

With Airstack Identity API, you can simply swap the address input to any Lens Profile:

{
  "address": "vitalik.lens"
}

By Farcaster Name or ID

With Airstack Identity API, you can simply swap the address input to any Farcaster Name or ID:

{
  "address": "fc_fname:vbuterin"
}

Last updated

#300: add-user-details

Change request updated