Skip to content

Authorized Devices

Request URL

POST /authenticateddevices

Description

Get an array with records for all devices currently authenticated for this user. These devices can be used to login with the user's credentials.

Schema

Array table for authenticateddevices

Array containing Description Required Schema
authenticateddevices items authenticateddevices items Array of authenticateddevices objects

Property table for authenticateddevices object

Property Description Required Schema
AFiLinkLinkId AFiLinkLinkId Yes {
  "type": "string"
}
isActive true if active No {
  "type": "boolean",
  "nullable": true
}

Request Body

[]

Snippet Examples

javascript

const axios = require('axios');
const data = [];
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/authenticateddevices',
  headers: {
    'Content-Type': "application/json"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/authenticateddevices" --data "[]" --header "Content-Type: application/json" 

Successful Response Examples

200 AUTHENTICATEDDEVICES SUCCESSFUL RESPONSE NO AUTHORIZED DEVICES

HEADERS

Header Value
Content-Type application/json

REQUEST BODY

[] //Body must be an array

RESPONSE BODY

{
    "success": true,
    "linklinks": []
}

200 AUTHENTICATEDDEVICES SUCCESSFUL RESPONSE

HEADERS

Header Value
Content-Type application/json

REQUEST BODY

[{
    "AFiLinkLinkId": "AAOQODLGG",
    "isActive": true
}] //Body must be an array

RESPONSE BODY

{
    "success": true,
    "linklinks": [
        {
            "AFiUserId": "qweaurl8kgtlv9pc",
            "dtsCreated": "2023-12-20T19:37:00.686Z",
            "dtsExpiry": "2023-12-20T20:37:00.686Z",
            "linklink": "AAOQODLGG",
            "isActive": true,
            "isVerified": false,
            "AFiLinkLinkId": "qweawlllqe6dhxqipxeewebqpodnrgdpggtol"
        }
    ]
}