Docs > The API >

User Objects

The idea

From many API calls, you'll get back a user object. Sometimes the user is you. For example, if you just logged in, you got back a me object in the result. Other times, you'll make an API call that gets info on other users.

The user object is a dictionary which has a variety of sub-objects. Which objects show up in a user object are a function of (1) your authorization (viewing yourself tends to include more info), and (2) the service you're using. Some services don't bother looking up info you're not likely to need. The user/lookup API call expects you to specify which of the following fields you want.

A fully-loaded example

The following shows a user object, as seen by the user herself. For convenience, we've collapsed each of the sub-objects and we'll go into them next.

{
   "id":               "55c079bf5f1650fc1361a1c3a4709900",
   "basics":           { },
   "invitation_stats": { },
   "profile":          null,
   "emails":           { },
   "public_keys":      { },
   "private_keys":     { }
}

user.id

A user's id is a random 32-digit hex string.

user.basics

This stores the simplest and often most commonly-accessed info about a user. The salt value, while public via the API call getsalt, is excluded if the user is not requesting his own data.

{
  "basics": {
    "uid":      "55c079bf5f1650fc1361a1c3a4709900",
    "salt":     "533a6842479b5e925856d1ce2a444...",
    "username": "chris",
    "ctime":    1383161061,
    "mtime":    1383161061,
  },
}

user.invitation_stats

Keybase is invitation-only, at least for now. Invitations are sent via the Keybase website, but you can query for available invitations via the API. This object is only returned for self-lookups.

{
  "invitation_stats": {
    "available": 3,
    "used":      0,
    "power":     0,
    "open":      0
   }
}

user.profile

By default, user.profile is null, until a user creates one. Once he/she creates one, some fields may still be null.

{
  "profile": {
    "full_name":  "Chris Coyne",
    "location":   null,
    "bio":        "I am the terror that flaps in the night.",
    "mtime":      1383247339
  }
}

user.emails

This info is only available in self-lookups. While "emails" is plural, Keybase currently only supports one primary email per user.

{
  "emails": {
    "primary": {
      "email":        "chris@okcupid.com",
      "is_verified":  0
    }
}

user.public_keys

Keybase's interface currently supports one key per user. Uploading a new key requires revoking/replacing an old one. However, the public_keys object is designed to support multiple in the future.

You should access someone's public key with public_keys.primary.

{
  "public_keys": {
    "primary": {
      "key_fingerprint: "e53878dbb0e644cff5f10e20fa9930221099dd13",
      "kid": "d028ac1542b24a5f77f123ba467873e3ce96a992570a",
      "key_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nyVJ1gRtP1eGJv6LZ01ABCSJg4h+tgKZuVHIX+i+rcqOY3ABEYWrhfjJBuVNPkM2I\nFoMllSH7/ywNv8k8PvNBtybqrMiIUJyGrtLvjKhxmD+yxxvPcHWbTkearCycY4QW\nVlLXYoBhF0AWKph5v/M=\n=3FfV\n-----END PGP PUBLIC KEY BLOCK-----\n",
      "mtime": 1383685212,
      "ctime": 1383685212
    }
  }
}

user.private_keys

Keybase users are free to Triplesec-encrypt their private keys and store them on Keybase. This allows for great portabilitiy and more power in the client.

A user who stores their private key on Keybase can access it via private_keys.primary.

{
   "private_keys": {
      "kid": "d028ac1542b24a5f77f123ba467873e3ce96a992570a",
      "key_type": 2,
      "bundle": "hKRib2R5gqRwcml2gqRkYXRhxQa2HJTX3gAAAANTOmhCR5teklhW0c4qTwYrsXaHPHJBkz2IrjMKbyArrlgwE/ryAFO+Q35zMDjbC4tItr1rF7hH6hPHSsA72BVQrAm77Lv0ftYPkqvv5Own+cno85K8PbHd7nOqvubJFvDCeBFlsz3sLzlpo7nQQ9Cbctd5AnhYvq+H+je6Szvvqwy66CulVQ6RWLwz2GYExCbxvf8GjjKGwKbZ4xdhuom1dVsjKUcdeGLdVI8W7nGN4htTWLv3KN+BRpFHVIUwyLJTMENOt++ALkWOqMIXMo35E7eC0xT4HJMZZX27vjQWN3O2G0OazSbkxhBaNDygE15jVm7olTfKkRAmO0+IcmTU6eoIfvdd87UlpsP05MbsivSVO/AD9oyL82lTmoZ13AGxS9LoJe0uuR5/e/K3zybTSK3aMEqhVSfvYxsl3ClJqs8avkQ8uR5BxzWBKp3aheR9WUmQAG0mo7rv+n0apl70G8uxIHViPLuuQxQPRFLv0ebXDuwkD2ZQY+mUS6cgJrEZloCF/sTdri57IWWJqSgve9IqZWSb5xM3IymSEIF0yTrDIIIL8MvKyT8pvTzfs142gioDyCY9Gvxr4aq0eK2irsKnzKVkQ5b2gYYz8B901R4cQLuoTI4alSe2xwFNXW7936vrjkBqDCRPWjhXaAc9sMnW5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EEJoFJ6hMCqR3S88Kj/Jzu3jTiY+sqOsCDqMOv83AiKWBEL7U28eqhb7wUEOL9nbKOWsQVvCqtla8vgQBLPZ3kYxs1CfJCnaC/bT6abh8+OHECSTENmurSV0a22IlMNJrU+3DZ/A3nrca8GGcQARAQABwsCDBBgBCgAPBQJSeVsEBQkB4TOAAhsuAKgJEBvl3l75UH9ynSAEGQEKAAYFAlJ5WwQACgkQl6sBE/Y073xyYwQAryX0fcCAO/ZCZi3pC26CWUtu6Vr6uSl9VSIRQFqcNoZ7PIcjQwGif/iHbBSap1wDkRBlMKkd76vJi67z3etGZ5bJUb4iG/IJUOx6Yn2RGFtyV6N3t1w84dafqaR3cuOsT+UPYSIBjxgUPqfN68hqhW0ZBjXCva/P3dPhLulm6zY1AgQAqNDxGPui5OfNBzczq2raoF8EyVJ1gRtP1eGJv6LZ01ABCSJg4h+tgKZuVHIX+i+rcqOY3ABEYWrhfjJBuVNPkM2IFoMllSH7/ywNv8k8PvNBtybqrMiIUJyGrtLvjKhxmD+yxxvPcHWbTkearCycY4QWVlLXYoBhF0AWKph5v/OkaGFzaIKkdHlwZQildmFsdWXEID53BcxAjjaNfGGMCqViytZHSDCMb21bWRcw1LOqYyfJo3RhZ80CAad2ZXJzaW9uAQ==",
      "mtime": 1383685212,
      "ctime": 1383685212
    }
}

user.cryptocurrency_addresses

Keybase users can sign and post a bitcoin address, either through the web interface or via the command line with keybase btc <address>.

{
  "cryptocurrency_addresses": {
      "bitcoin": [
        {
          "address": "1EYmDLBvvkd4ALmfRTT4JXXrpvibeU...",
          "sig_id": "2a3d5cb29ef73801db5781fddfa3bc0..."
        }
      ]
  }
}