Get application access token

  • Get application’s access token
  • URL: https://api.linkedface.com/oauth/app/token
  • Method: POST
  • Default valid time for token is: 1 days. After this time, token is expired
  • Data type: application json
  • json fields: app_id, secret

Example:

  • URL: https://api.linkedface.com/oauth/app/token
  • Method: POST
  • Content-Type: application/json
  • Payload: {"app_id":"0b3422a7a3c9c4da4", "secret":"N6PNDLDV040KBKSJA9N"}

Response:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0OTE5NzEyODksInN1YiI6IjVjOTQyNjc0YzkyZGFlMmY0ZjcwOTk0ZTBkNWQ1ZjU4IiwiZXhwIjoxNDkzMTgwODg5fQ.LVIkv7TrfdIQ5SWR1D3UL5s……"
}

Upload image for searching

  • Upload image for searching later
  • URL: https://api.linkedface.com/post/create
  • Methods: POST
  • Data type: form-data
  • Key name for image file: faceImage

Sample response:

{
    "agent": null,
    "browser": null,
    "content": null,
    "created": "Tue, 13 Jun 2017 09:25:35 GMT",
    "faces": "[{\"position\": \"[194, 143, 656, 605]\", \"id\": \"4cb6ab4f86f83bb48ff19f24f027f9dc\"}]",
    "fileName": "2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
    "fullpath": "https://img.linkedface.com/search/imgs/2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
    "id": "093af95a7cdb21d0c7d23f98e2f58acd",
    "ip": "172.31.62.124",
    "status": 1,
    "user_id": null
}

Note:

  • After 1 days, we will delete all images that was posted for searching

Search user

  • This API searches for users that have joined application. Applications are created in Linkedface++ by developers.
  • You application must be started before searching for users. Refer to application operations for more information.
  • URL: https://api.linkedface.com/app/search/imgId
  • Methods: GET
  • Header: Authorization: BEARER app_access_token

imgId is image id that user posted into Linkedface++ for searching

Example:

  • URL: https://api.linkedface.com/app/search/093af95a7cdb21d0c7d23f98e2f58acd

Header:

Authorization: BEARER eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0OTU0Njc2ODgsInN1YiI6IjVjOTQyNjc0YzkyZGFlMmY0ZjcwOTk0ZTBkNWQ1ZjU4IiwiZXhwIjoxNDk2Njc3Mjg4fQ.AI9448qsVAIAr-zDRQ1fEIlstALPtKOMf_gAk

Response:

{
    "status": 1,
    "sample": {
        "status": 1,
        "user_id": null,
        "created": "2017-06-13T09:25:35.698000",
        "ip": "172.31.6.24",
        "agent": null,
        "fileName": "2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
        "content": null,
        "faces": "[{\"position\": \"[194, 143, 656, 605]\", \"id\": \"4cb6ab4f86f83bb48ff19f24f027f9dc\"}]",
        "fullpath": "https://img.linkedface.com/search/imgs/2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
        "id": "093af95a7cdb21d0c7d23f98e2f58acd",
        "browser": null
    },
    "message": "ok/success",
    "image_root": "https://img.linkedface.com/ifaces",
    "profiles": [
        {
            "username": "vxrthuc@yahoo.com",
            "status": 0,
            "first_name": "Papai",
            "last_name": "King",
            "name": "Thức Xuân Vũ",
            "matched_face": "4cb6ab4f86f83bb48ff19f24f027f9dc",
            "picture": "https://img.linkedface.com/ifaces/thumbs/300/2017-05-26/118.70.217.99_1495781823.09724_image201610280001.jpg",
            "created": "2017-03-31T16:00:15",
            "pid": "fst",
            "about": "I'm a Enterprise Application, Cloud.",
            "id": "5c942674c92dae2f4f70994e0d5d5f58",
            "images": [
                {
                    "status": 1,
                    "user_id": "5c942674c92dae2f4f70994e0d5d5f58",
                    "parent": null,
                    "fileName": "2017-05-24/118.68.248.44_1495617621.11503_image201610280003.jpg",
                    "content": null,
                    "faces": "[{\"position\": \"[384, 241, 705, 562]\", \"id\": \"87240850b751f3ffa1656ed74333107b\"}]",
                    "date": "2017-05-24T16:20:22.427000",
                    "next": null,
                    "type": 1,
                    "id": "b13ae6c6c7fcd7974301028ae6184a24",
                    "previous": null
                }
            ],
            "similarity": 1,
            "email": "vxrthuc@yahoo.com"
        }
    ]
}

Notes

  • To access profile images, you use URL template: image_root + '/imgs/' + profiles[i].images[i].fileName
  • If there’s any change related to application: users, user data, threshold, it’ll be updated in search not longer than 15 minutes.
  • If you want to update changed data to your application immediately, you can stop and then start application again to make this value affect to search result.

Get uploaded image information

  • Get information about image that posted into Linkedface++
  • URL: https://api.linkedface.com/post/get/imgId
  • Methods: GET

Note:

  • After 1 days, we will delete all images that was posted for searching. That means your image id will be expired.

Example:

  • URL: https://api.linkedface.com/post/get/093af95a7cdb21d0c7d23f98e2f58acd

Response:

{
    "status": 1,
    "user_id": null,
    "created": "2017-06-13T09:25:35.698000",
    "ip": "172.31.6.24",
    "agent": null,
    "fileName": "2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
    "content": null,
    "faces": "[{\"position\": \"[194, 143, 656, 605]\", \"id\": \"4cb6ab4f86f83bb48ff19f24f027f9dc\"}]",
    "fullpath": "https://img.linkedface.com/search/imgs/2017-06-13/172.31.6.24_1497320735.18424_facechecker_12-12-39-140543.jpg",
    "id": "093af95a7cdb21d0c7d23f98e2f58acd", 
    "browser": null
}

Get user information

  • Get all information on user that has already joined application
  • URL: https://api.linkedface.com/ifaces/app/user_info/user_id
  • Methods: GET
  • Header: Authorization: BEARER app_access_token
  • Return data type: application/json

Example:

  • URL: https://api.linkedface.com/ifaces/app/user_info/5c942674c92dae2f4f70994e0d5d5f58

Header

Authorization: BEAR eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0OTI0OTE5MzAsInN1YiI6IjBiMzQyMmE3YTNjOWM0OGYyMWZmMTY1YWJmZGFmZTQ0IiwiZXhwIjoxNDkzNzAxNTMwfQ.Wkkpj48gHuHVuy30GZJHqOycFnqTvu0AdR

Response:

{
    "username": "vxtrhuc@yahoo.com",
    "status": 0,
    "first_name": "Papai",
    "last_name": "King",
    "picture": "https://img.linkedface.com/ifaces/thumbs/300/2017-05-26/118.70.217.99_1495781823.09724_image201610280001.jpg",
    "name": "Thức Xuân Vũ",
    "social_networks": [
        {
            "picture": "http://pbs.twimg.com/profile_images/854910758424952832/fq7wJPbc_normal.jpg",
            "about": "I'm a software developer, Labs founder in: https://t.co/NPI5TKbSNN",
            "last_name": null,
            "user_id": "5c942674c92dae2f4f70994e0d5d5f58",
            "name": "LeopardVu",
            "created": "2017-05-26T11:00:23",
            "network_id": 3,
            "social_id": "854910172598226944",
            "first_name": null,
            "link": "https://twitter.com/LeopardVu",
            "email": null
        }
    ],
    "created": "2017-03-31T16:00:15",
    "image_root": "https://img.linkedface.com/ifaces",
    "about": "I'm a , Mobile Enterprise Application, Cloud.",
    "email": "vxrthuc@yahoo.com",
    "images": [
        {
            "status": 1,
            "user_id": "5c942674c92dae2f4f70994e0d5d5f58",
            "parent": null,
            "fileName": "2017-05-24/118.68.248.44_1495617621.11503_image201610280003.jpg",
            "content": null,
            "faces": "[{\"position\": \"[384, 241, 705, 562]\", \"id\": \"87240850b751f3ffa1656ed74333107b\"}]",
            "date": "2017-05-24T16:20:22.427000",
            "next": null,
            "type": 1,
            "id": "b13ae6c6c7fcd7974301028ae6184a24",
            "previous": null
        }
    ],
    "id": "5c942674c92dae2f4f70994e0d5d5f58"
}

To access profile images, you use URL template: image_root + '/imgs/' + images[i].fileName