Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Phase II: A Simple HTTPS Server

Kumin In edited this page Dec 5, 2016 · 23 revisions

API Endpoints

Login user

POST /api/v1/login

Creates and login the user by using their facebook profile.

Parameters:

Name Type Description
access_token String User's facebook access token

Response:

Response: 200
{
  "Session": "True",
  "user": {
    "_id": "5844c20d7ee7e822d4d5414e",
    "name": "Kumin In",
    "email": "[email protected]",
    "profilePhotoURL": "graph.facebook.com/Kumin_facebook_id/picture",
    "__v": 1,
    "keywords": [
      "example",
      "@example",
      "com",
      "kumin"
    ],
    "pendingFriends": [],
    "friends": [
      "friend_facebook_id"
    ],
    "publicKey": {
      "keys": {
        "pgp": "Pretty Good Privacy Key",
        "readable": "Readable Key"
      }
    },
    "facebook": {
      "id": "Kumin_facebook_id"
    }
  }
}

Get user information by id

GET /api/v1/user/:id

Retrieves the user information based on the Facebook ID.

Parameters:

Name Type Description
access_token String User's facebook access token
id String A User's facebook ID

Response:

Response: 200
{
  "Session": "True",
  "user": {
    "_id": "5844c20d7ee7e822d4d5414e",
    "name": "Kumin In",
    "email": "[email protected]",
    "profilePhotoURL": "graph.facebook.com/Kumin_facebook_id/picture",
    "__v": 1,
    "keywords": [
      "example",
      "@example",
      "com",
      "kumin"
    ],
    "pendingFriends": [],
    "friends": [
      "friend_facebook_id"
    ],
    "publicKey": {
      "keys": {
        "pgp": "Pretty Good Privacy Key",
        "readable": "Readable Key"
      }
    },
    "facebook": {
      "id": "Kumin_facebook_id"
    }
  }
}

Get public key for a user.

Parameters:

Name Type Description
access_token String User's facebook access token

GET /api/v1/user/:id/publicKey

response 200
{
  "publicKey": "Pretty Good Privacy Key",
  "readableKey": "Readable Key"
}

Update existing public key for the user.

PUT /api/v1/user/publicKey

Parameters:

Name Type Description
access_token String User's facebook access token
id String A User's facebook ID
publicKey String A User's PGP Key

Response:

Response: 201
{
  "Session": "True",
  "user": {
    "_id": "5844c20d7ee7e822d4d5414e",
    "name": "Kumin In",
    "email": "[email protected]",
    "profilePhotoURL": "graph.facebook.com/Kumin_facebook_id/picture",
    "__v": 1,
    "keywords": [
      "example",
      "@example",
      "com",
      "kumin"
    ],
    "pendingFriends": [],
    "friends": [
      "friend_facebook_id"
    ],
    "publicKey": {
      "keys": {
        "pgp": "Pretty Good Privacy Key",
        "readable": "Readable Key"
      }
    },
    "facebook": {
      "id": "Kumin_facebook_id"
    }
  }
}

Get user's pending friends and friends

GET /api/v1/user/friend/get

Gets the list of friends and pending friends for the user.

Parameters:

Name Type Description
access_token String User's facebook access token

Response:

Response: 200
{
  "friends": [
    {
      "_id": "584490541edb751c5ff4dd1c",
      "name": "Shush Tester",
      "profilePhotoURL": "graph.facebook.com/facebookid/picture",
      "publicKey": {
        "keys": {
          "pgp": "PGP KEY",
          "readable": "Readable Key"
        }
      },
      "facebook": {
        "id": "facebookid"
      }
    },
    {
      "_id": "5844c20d7ee7e822d4d5414e",
      "name": "Kumin In",
      "profilePhotoURL": "graph.facebook.com/facebookid/picture",
      "publicKey": {
        "keys": {
          "pgp": "PGP KEY",
          "readable": "Readable Key"
        }
      },
      "facebook": {
        "id": "facebookid"
      }
    }
   ],
  "pendingFriends": [
    {
      "_id": "5844c39b7ee7e822d4d5414f",
      "name": "Dorothy Goldmanson",
      "profilePhotoURL": "graph.facebook.com/facebookid/picture",
      "publicKey": {
        "keys": {
          "pgp": "PGP KEY",
          "readable": "Readable Key"
        }
      },
      "facebook": {
        "id": "facebookid"
      }
    }
  ]
}

Accept pending friend request

PUT /api/v1/user/friend/accept

Accepts a pending friend request for a given user.

Parameters:

Name Type Description
access_token String User's facebook access token
otherUserID String other user's facebook Id

Response:

Response: 201
{
  "message": "Successfully added friends"
}

Decline pending friend request

PUT /api/v1/user/friend/decline

Declines a pending friend request for a given user.

Parameters:

Name Type Description
access_token String User's facebook access token
otherUserID String other user's facebook Id

Response:

Response: 201
{
  "message": "Successfully removed pending friend."
}

Create new friend request

PUT /api/v1/user/friend/add

Creates a new pending friend request for the given user.

Parameters:

Name Type Description
access_token String User's facebook access token
otherUserID String other user's facebook Id

Response:

Response: 201
{
  "message": "Successfully added to pending list"
}

Accept pending friend request

PUT /api/v1/user/friend/delete

Remove a friend from the user's friend list.

Parameters:

Name Type Description
access_token String User's facebook access token
otherUserID String other user's facebook Id

Response:

Response: 201
{
  "message": "Successfully deleted friend."
}

Get all conversation for a user

GET /api/1/conversation

Retrieves All of the User's conversation.

Parameters:

Name Type Description
access_token String User's facebook access token

Response:

Response: 200
[
  {
    "_id": "5844c5b3aa109f230ea416de",
    "conversationID": "58448f921edb751c5ff4dd1b_584490541edb751c5ff4dd1c_5844c39b7ee7e822d4d5414f",
    "date": "2016-12-05T01:42:12.289Z",
    "__v": 2,
    "messages": [
      {
        "_id": "5844c5b3aa109f230ea416df",
        "message": [
          {
            "_id": "5844c5b3aa109f230ea416db",
            "message": "{\"messageText\":\"U2FsdGVkX181/XMfO0sZDDVwTSs56jSZuDkwexcUSvk=\",\"messageHmac\":\"b760f1ddde1bd50c229f931c312ce6d9cd944dd4aa7b49626ae1ac222721ec8c\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dc",
            "message": "{\"messageText\":\"U2FsdGVkX19geAUJQiAVtstzQ75LcC/0ncCaeMZWTfg=\",\"messageHmac\":\"9e542b1c428d1ef14cf52eb2a6fdf7eb378ab601eb8462ac7513857564c445c2\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dd",
            "message": "{\"messageText\":\"U2FsdGVkX1+PImcjXxLUKS1AeHttLe3kdQtRmYVkGCY=\",\"messageHmac\":\"e67936855b3cbd1bc7b820fe83c02f6ba7d12a63ec2ceb49ca2e4a0d6818773e\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          }
        ]
      },
      {
        "_id": "5844c5c5aa109f230ea416e3",
        "message": [
          {
            "_id": "5844c5c5aa109f230ea416e0",
            "message": "{\"messageText\":\"U2FsdGVkX18t+JMHakBVubLAAdjkv0dDi2ImmUy/FouW845yy5TBDFxrMgPwtS0Y\",\"messageHmac\":\"ea19019561dc96aea7e8f47ea252c44ead4e5efb4d5c38fa551aeae83b300dbe\"}",
            "from": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "date": "2016-12-05T01:41:25.775Z",
            "issuedTo": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5c5aa109f230ea416e1",
            "message": "{\"messageText\":\"U2FsdGVkX1+Q/Im0NbsTnJ21zWkfLarm0cIfGH7s1lK3JNkJY+Wqlpk6U6KOsjoO\",\"messageHmac\":\"60b9bcb3d7a93e7dd214fc0a0218f140da3c813ebe4da64253af56b3ff916033\"}",
            "from": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "date": "2016-12-05T01:41:25.775Z",
            "issuedTo": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5c5aa109f230ea416e2",
            "message": "{\"messageText\":\"U2FsdGVkX18uxeiATzk+xEx3SeshSpfXChmg8s3ltlb0uEAWzK8R9VK8hXATmUp1\",\"messageHmac\":\"d822e35646fb6ee91a0da79df6a14254730a181e093e78fd986db7248107c3ed\"}",
            "from": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "date": "2016-12-05T01:41:25.775Z",
            "issuedTo": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          }
        ]
      },
      {
        "_id": "5844c5f4aa109f230ea416e7",
        "message": [
          {
            "_id": "5844c5f4aa109f230ea416e4",
            "message": "{\"messageText\":\"U2FsdGVkX19CuktezgEQwpSiFToOleT571aBEeXi/Xmai5w3S2asHro/SaXBhZcGXrS18Th/yslkfuF0L2YMNA==\",\"messageHmac\":\"4c7aa4900bd8a7dd5b237070bb10e9324f1dd0b0d2611dfc84ff297915a2c8bd\"}",
            "from": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "date": "2016-12-05T01:42:12.289Z",
            "issuedTo": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5f4aa109f230ea416e5",
            "message": "{\"messageText\":\"U2FsdGVkX186Ki51xbPeGtRjH4DwRCLQNREYWH+e51a4Xy64PramN7T6v9oCQrWmZPnBeAEH4bZHTPE/Wx251A==\",\"messageHmac\":\"9191917896c54da1e4c6e2e5f1ad5c8841e5b090d61eca591e615e14b7716049\"}",
            "from": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "date": "2016-12-05T01:42:12.289Z",
            "issuedTo": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5f4aa109f230ea416e6",
            "message": "{\"messageText\":\"U2FsdGVkX1/EeYG7Mxk7Tx7DozCxP2oYpFvusQIdeyRqjuhcpw1hhgJ0sTEjRcNqG/9649X20aD9SOOZaUiKag==\",\"messageHmac\":\"471d672bbdb7550ea35bbc4ab555b0bd484ce0b0b83ac11ff13d77fec6669f0c\"}",
            "from": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "date": "2016-12-05T01:42:12.289Z",
            "issuedTo": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          }
        ]
      }
    ],
    "members": [
      {
        "_id": "58448f921edb751c5ff4dd1b",
        "name": "Aaron Turner",
        "email": "",
        "profilePhotoURL": "graph.facebook.com/363405437330119/picture",
        "__v": 7,
        "keywords": [
          "aaron",
          "turner"
        ],
        "pendingFriends": [],
        "friends": [
          "103333946827384",
          "10209053747955912",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "363405437330119"
        }
      },
      {
        "_id": "584490541edb751c5ff4dd1c",
        "name": "Shush Tester",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/103333946827384/picture",
        "__v": 5,
        "keywords": [
          "shush_xxzudhv_tester@tfbnw",
          "shush",
          "tester"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "103333946827384"
        }
      },
      {
        "_id": "5844c39b7ee7e822d4d5414f",
        "name": "Dorothy Goldmanson",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/101368983691345/picture",
        "__v": 4,
        "keywords": [
          "akniajhwiv_",
          "@tfbnw",
          "dorothy",
          "goldmanson"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "103333946827384"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "101368983691345"
        }
      }
    ]
  }
]

Update a conversation for a user.

PUT /api/v1/conversation

Updates a conversation with a new message from a user.

Parameters:

Name Type Description
access_token String User's facebook access token
message Object The message being sent

message Object:

{
	"access_token": "access_token",
	"message": {
		"5840b911de8fe11352d23869" : "Message Encrypted with Kumin's key.",
		"5840b926de8fe11352d2386a" : "Message Encrypted with Aaron's key."
	},
	"messageKey": { 
		"5840b911de8fe11352d23869" : "312bdfjg2Efh241", 
		"5840b926de8fe11352d2386a" : "443j2h4jl13kkfH"
	},
	"conversationID" : "5840b911de8fe11352d23869_5840b926de8fe11352d2386a"
}

Response:

Response: 201
[
  {
    "_id": "5844c5b3aa109f230ea416de",
    "conversationID": "58448f921edb751c5ff4dd1b_584490541edb751c5ff4dd1c_5844c39b7ee7e822d4d5414f",
    "date": "2016-12-05T01:42:12.289Z",
    "__v": 2,
    "messages": [
      {
        "_id": "5844c5b3aa109f230ea416df",
        "message": [
          {
            "_id": "5844c5b3aa109f230ea416db",
            "message": "{\"messageText\":\"U2FsdGVkX181/XMfO0sZDDVwTSs56jSZuDkwexcUSvk=\",\"messageHmac\":\"b760f1ddde1bd50c229f931c312ce6d9cd944dd4aa7b49626ae1ac222721ec8c\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dc",
            "message": "{\"messageText\":\"U2FsdGVkX19geAUJQiAVtstzQ75LcC/0ncCaeMZWTfg=\",\"messageHmac\":\"9e542b1c428d1ef14cf52eb2a6fdf7eb378ab601eb8462ac7513857564c445c2\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dd",
            "message": "{\"messageText\":\"U2FsdGVkX1+PImcjXxLUKS1AeHttLe3kdQtRmYVkGCY=\",\"messageHmac\":\"e67936855b3cbd1bc7b820fe83c02f6ba7d12a63ec2ceb49ca2e4a0d6818773e\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          }
        ]
      }
    ],
    "members": [
      {
        "_id": "58448f921edb751c5ff4dd1b",
        "name": "Aaron Turner",
        "email": "",
        "profilePhotoURL": "graph.facebook.com/363405437330119/picture",
        "__v": 7,
        "keywords": [
          "aaron",
          "turner"
        ],
        "pendingFriends": [],
        "friends": [
          "103333946827384",
          "10209053747955912",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "363405437330119"
        }
      },
      {
        "_id": "584490541edb751c5ff4dd1c",
        "name": "Shush Tester",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/103333946827384/picture",
        "__v": 5,
        "keywords": [
          "shush_xxzudhv_tester@tfbnw",
          "shush",
          "tester"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "103333946827384"
        }
      },
      {
        "_id": "5844c39b7ee7e822d4d5414f",
        "name": "Dorothy Goldmanson",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/101368983691345/picture",
        "__v": 4,
        "keywords": [
          "akniajhwiv_",
          "@tfbnw",
          "dorothy",
          "goldmanson"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "103333946827384"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "101368983691345"
        }
      }
    ]
  }
]

Create a new conversation for a user.

POST /api/v1/conversation

Create a new conversation for the users provided. Message Object is sent as a JSON Object in the body.

Parameter:

Name Type Description
access_token String User's facebook access token
message Object The message being sent

message Object:

{
	"access_token": "UserAccessToken",
	"message": "Hey, I can send a message to the server :^)!!",
	"names": ["List_Of_Names"],
	"members": ["List_Of_Facebook_ID"]
}

Response:

Response: 201
[
  {
    "_id": "5844c5b3aa109f230ea416de",
    "conversationID": "58448f921edb751c5ff4dd1b_584490541edb751c5ff4dd1c_5844c39b7ee7e822d4d5414f",
    "date": "2016-12-05T01:42:12.289Z",
    "__v": 2,
    "messages": [
      {
        "_id": "5844c5b3aa109f230ea416df",
        "message": [
          {
            "_id": "5844c5b3aa109f230ea416db",
            "message": "{\"messageText\":\"U2FsdGVkX181/XMfO0sZDDVwTSs56jSZuDkwexcUSvk=\",\"messageHmac\":\"b760f1ddde1bd50c229f931c312ce6d9cd944dd4aa7b49626ae1ac222721ec8c\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "58448f921edb751c5ff4dd1b",
              "name": "Aaron Turner",
              "profilePhotoURL": "graph.facebook.com/363405437330119/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dc",
            "message": "{\"messageText\":\"U2FsdGVkX19geAUJQiAVtstzQ75LcC/0ncCaeMZWTfg=\",\"messageHmac\":\"9e542b1c428d1ef14cf52eb2a6fdf7eb378ab601eb8462ac7513857564c445c2\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          },
          {
            "_id": "5844c5b3aa109f230ea416dd",
            "message": "{\"messageText\":\"U2FsdGVkX1+PImcjXxLUKS1AeHttLe3kdQtRmYVkGCY=\",\"messageHmac\":\"e67936855b3cbd1bc7b820fe83c02f6ba7d12a63ec2ceb49ca2e4a0d6818773e\"}",
            "from": {
              "_id": "584490541edb751c5ff4dd1c",
              "name": "Shush Tester",
              "profilePhotoURL": "graph.facebook.com/103333946827384/picture"
            },
            "date": "2016-12-05T01:41:07.170Z",
            "issuedTo": {
              "_id": "5844c39b7ee7e822d4d5414f",
              "name": "Dorothy Goldmanson",
              "profilePhotoURL": "graph.facebook.com/101368983691345/picture"
            },
            "messageKey": "message key for issuedTo.name",
            "__v": 0
          }
        ]
      }
    ],
    "members": [
      {
        "_id": "58448f921edb751c5ff4dd1b",
        "name": "Aaron Turner",
        "email": "",
        "profilePhotoURL": "graph.facebook.com/363405437330119/picture",
        "__v": 7,
        "keywords": [
          "aaron",
          "turner"
        ],
        "pendingFriends": [],
        "friends": [
          "103333946827384",
          "10209053747955912",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "363405437330119"
        }
      },
      {
        "_id": "584490541edb751c5ff4dd1c",
        "name": "Shush Tester",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/103333946827384/picture",
        "__v": 5,
        "keywords": [
          "shush_xxzudhv_tester@tfbnw",
          "shush",
          "tester"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "101368983691345"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "103333946827384"
        }
      },
      {
        "_id": "5844c39b7ee7e822d4d5414f",
        "name": "Dorothy Goldmanson",
        "email": "[email protected]",
        "profilePhotoURL": "graph.facebook.com/101368983691345/picture",
        "__v": 4,
        "keywords": [
          "akniajhwiv_",
          "@tfbnw",
          "dorothy",
          "goldmanson"
        ],
        "pendingFriends": [],
        "friends": [
          "363405437330119",
          "103333946827384"
        ],
        "publicKey": {
          "keys": {
            "pgp": "Pretty Good Privacy Key",
            "readable": "Readable Key"
          }
        },
        "facebook": {
          "id": "101368983691345"
        }
      }
    ]
  }
]