User profile data

What user context data is available to your bot via user scope database

Standard user data

By default the following user data will be set at the root of the user database:

FieldDescription
usernameTwitter username
first_nameFirst name
last_nameLast name
avatar_urlTwitter profile picture

Twitter-specific user data

You can access twitter-specific user data via {{ user._integrations.twitter.<key> }} in BFML or self.db.user.get("_integrations")["twitter"][key].

Example user data

{
  "username": "ekalvi",
  "first_name": "Erik",
  "last_name": "Kalviainen",
  "_integrations": {
    "twitter": {
      "username": "ekalvi",
      "first_name": "Erik",
      "last_name": "Kalviainen",
      "verified": false,
      "description": "I make an awesome bot platform called @meya. Past: ProductWiki founder. Product @ Google.",
      "friends_count": 169,
      "url": "https://meya.ai ",
      "profile_image_url_https": "https://pbs.twimg.com/profile_images/575499425126223872/6czAzdZc_normal.jpeg",
      "profile_image_url": "http://pbs.twimg.com/profile_images/575499425126223872/6czAzdZc_normal.jpeg",
      "name": "Erik Kalviainen",
      "followers_count": 303,
      "avatar_url": "https://pbs.twimg.com/profile_images/575499425126223872/6czAzdZc_normal.jpeg …",
      "followers": 303,
      "location": "Waterloo, Ontario, Canada",
      "statuses_count": 777,
      "created_timestamp": "1201618647000",
      "user_id": "12831172",
      "protected": false,
      "id": "12831172",
      "screen_name": "ekalvi"
    }
  },
  "avatar_url": "https://pbs.twimg.com/profile_images/575499425126223872/6czAzdZc_normal.jpeg",
  "id": "UJdZa9k8LHV",
  "bot_id": "BTENHNYsrhM"
}