Import the collectin into Postman. This will give you all the required requests. It uses environment variables provided by a environment file (template below).
Each of the endpoints can be used after you use the authentication link and store a Bearer token in the environment for subsequent usage. Some endpoints require earlier ones (eg. circle info requires circles to get the circleId [assumes first])
{
"id":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"name":"Life360",
"description":"",
"auth":null,
"events":[
{
"listen":"prerequest",
"script":{
"id":"9ff5ec8a-3f39-477f-a4c5-8c6a2b9995cb",
"type":"text\/javascript",
"exec":[
""
]
}
},
{
"listen":"test",
"script":{
"id":"81fcd597-3738-4a81-bf25-222072892b2b",
"type":"text\/javascript",
"exec":[
""
]
}
}
],
"variables":[
],
"order":[
"2e09d215-581c-4b68-9871-b545c8513532",
"41271993-5189-4e9e-9197-b2b84d1d9bcb",
"bdc3375c-08e0-4034-8c34-35ff74394bfa",
"c444a07a-111e-4931-9e91-57adce2a1e8c",
"5f2afa25-5349-4c53-92bc-b8b1c3b1a80d"
],
"folders_order":[
],
"folders":[
],
"requests":[
{
"id":"2e09d215-581c-4b68-9871-b545c8513532",
"name":"Get Bearer Token",
"url":"https:\/\/api.life360.com\/v3\/oauth2\/token.json",
"description":"",
"data":[
{
"key":"grant_type",
"value":"password",
"description":"",
"type":"text",
"enabled":true
},
{
"key":"username",
"value":"{{life360_username}}",
"description":"",
"type":"text",
"enabled":true
},
{
"key":"password",
"value":"{{life360_password}}",
"description":"",
"type":"text",
"enabled":true
}
],
"dataMode":"urlencoded",
"headerData":[
{
"key":"Authorization",
"value":"Basic cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg==",
"description":"",
"type":"text",
"enabled":true
},
{
"key":"Content-Type",
"name":"Content-Type",
"value":"application\/x-www-form-urlencoded",
"description":"",
"type":"text"
},
{
"key":"",
"value":"",
"description":"",
"type":"text",
"enabled":true
}
],
"method":"POST",
"pathVariableData":[
],
"queryParams":[
],
"auth":{
"type":"noauth",
"noauth":[
]
},
"events":[
{
"listen":"test",
"script":{
"id":"65305560-2a18-4487-8df4-220b9d3b28dd",
"exec":[
"var jsonData = JSON.parse(responseBody);",
"pm.environment.set(\"life360_bearertoken\", jsonData.access_token);",
""
],
"type":"text\/javascript"
}
}
],
"folder":null,
"preRequestScript":null,
"tests":"var jsonData = JSON.parse(responseBody);\npm.environment.set(\"life360_bearertoken\", jsonData.access_token);\n",
"currentHelper":null,
"helperAttributes":null,
"collectionId":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"headers":"Authorization: Basic cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg==\nContent-Type: application\/x-www-form-urlencoded\n",
"pathVariables":[
]
},
{
"id":"41271993-5189-4e9e-9197-b2b84d1d9bcb",
"name":"circles",
"url":"https:\/\/api.life360.com\/v3\/circles.json",
"description":"",
"data":null,
"dataMode":null,
"headerData":[
],
"method":"GET",
"pathVariableData":[
],
"queryParams":[
],
"auth":{
"type":"bearer",
"bearer":[
{
"key":"token",
"value":"{{life360_bearertoken}}"
}
]
},
"events":[
],
"folder":null,
"currentHelper":"bearerAuth",
"helperAttributes":{
"id":"bearer",
"token":"{{life360_bearertoken}}"
},
"collectionId":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"headers":"",
"pathVariables":[
]
},
{
"id":"5f2afa25-5349-4c53-92bc-b8b1c3b1a80d",
"name":"circle places",
"url":"https:\/\/api.life360.com\/v3\/circles\/{{life360_circleId}}",
"description":"",
"data":null,
"dataMode":null,
"headerData":[
],
"method":"GET",
"pathVariableData":[
],
"queryParams":[
],
"auth":{
"bearer":[
{
"key":"token",
"value":"{{life360_bearertoken}}"
}
],
"type":"bearer"
},
"events":[
],
"folder":null,
"currentHelper":"bearerAuth",
"helperAttributes":{
"id":"bearer",
"token":"{{life360_bearertoken}}"
},
"collectionId":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"headers":"",
"pathVariables":[
]
},
{
"id":"bdc3375c-08e0-4034-8c34-35ff74394bfa",
"name":"circle info",
"url":"https:\/\/api.life360.com\/v3\/circles\/{{life360_circleId}}",
"description":"",
"data":null,
"dataMode":null,
"headerData":[
],
"method":"GET",
"pathVariableData":[
],
"queryParams":[
],
"auth":{
"bearer":[
{
"key":"token",
"value":"{{life360_bearertoken}}"
}
],
"type":"bearer"
},
"events":[
],
"folder":null,
"currentHelper":"bearerAuth",
"helperAttributes":{
"id":"bearer",
"token":"{{life360_bearertoken}}"
},
"collectionId":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"headers":"",
"pathVariables":[
]
},
{
"id":"c444a07a-111e-4931-9e91-57adce2a1e8c",
"name":"circle members",
"url":"https:\/\/api.life360.com\/v3\/circles\/{{life360_circleId}}",
"description":"",
"data":null,
"dataMode":null,
"headerData":[
],
"method":"GET",
"pathVariableData":[
],
"queryParams":[
],
"auth":{
"bearer":[
{
"key":"token",
"value":"{{life360_bearertoken}}"
}
],
"type":"bearer"
},
"events":[
],
"folder":null,
"currentHelper":"bearerAuth",
"helperAttributes":{
"id":"bearer",
"token":"{{life360_bearertoken}}"
},
"collectionId":"5d7ee2e3-4207-4d4e-ad53-e13e8e815ae9",
"headers":"",
"pathVariables":[
]
}]}
Import as an environment, edit and provide your own login username and password as current values. Leave the other fields empty. Select this new environment when using the collection.
{
"id": "92761c38-57f3-48a3-839f-21e178f2f514",
"name": "life360",
"values": [
{
"key": "life360_username",
"value": "",
"enabled": true
},
{
"key": "life360_password",
"value": "",
"enabled": true
},
{
"key": "life360_bearertoken",
"value": "",
"enabled": true
},
{
"key": "life360_circleId",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-08-28T05:09:28.309Z",
"_postman_exported_using": "Postman/7.1.1"
}