# Find me Follow Me

Source: https://docs.qvoice.net/api/fmfm/

## User - Find me Follow me API documentation

## Table of contents

Find me Follow me feature functionality

Endpoints

- Get access token
- Set fmfm state
- Get fmfm profiles
- Create fmfm profile
- Edit fmfm profile
- Delete fmfm profile
- Get Devices

## Find me Follow me feature operation

- Find me Follow me feature has only two possible states “enabled: true” or “enabled: false”
- A FMFM profile defines the behaviour of the FMFM feature
- Every user can have multiple FMFM profiles
- Only one profile can be active simultaneously

## Endpoints

### Get access token

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/login |
| *verb* | POST |
| *request body* | {   "username": "yourUserName",   "password": "yourPassword",   "domain": "yourTenant"  } |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | Response body:  {      "user": {          ...      },      "access\_token": "**{access\_token\_value}**",      "refresh\_token": "**{refresh\_token\_value}**"  } |
| 400 | The information sent is invalid. |
| 500 | Error due to an internal issue. |

### Set FMFM state

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/fmfm |
| *verb* | PUT |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |
| Request Body | {    “enabled”:  true  } |

|  |  |
| --- | --- |
| Response | |
| ***Code*** | ***Description*** |
| 200 | OK |
| 400 | The information sent is invalid. |
| 500 | Internal server error |

### Get FMFM profiles

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/fmfm/profiles |
| *verb* | GET |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | Response body:  [    {      "id": "string",      "name": "string",      "active": true    },    {      "id": "string",      "name": "string",      "active": true    }  ] |
| 400 | The information sent is invalid. |
| 500 | Internal server error |

### Create fmfm profile

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/fmfm/profiles |
| *verb* | POST |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |
| Request body | {     "name": "new\_fmfm\_profile",     "active": false,     "devices": [         {             "id": "device\_id\_1",             "not\_ring": false,             "start": 0,             "end": 40         },       {             "id": "device\_id\_2",             "not\_ring": false,             "start": 0,             "end": 40         }     ]  } |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | OK |
| 400 | The information sent is invalid. |
| 500 | Internal server error |

### Edit fmfm profile

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/fmfm/profiles/{profile\_id} |
| *verb* | PUT |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |
| Request body | {     "name": "new\_fmfm\_profile",     "active": false,     "devices": [         {             "id": "device\_id\_1",             "not\_ring": false,             "start": 0,             "end": 40         },       {             "id": "device\_id\_2",             "not\_ring": false,             "start": 0,             "end": 40         }     ]  } |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | OK |
| 400 | The information sent is invalid. |
| 500 | Internal server error |

### Delete fmfm profile

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/fmfm/profiles/{profile\_id} |
| *verb* | DELETE |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | OK |
| 400 | The information sent is invalid. |
| 500 | Internal server error |

### Get devices

|  |  |
| --- | --- |
| ***Request*** | |
| *endpoint* | https://{portalURL}:9443/ucp/v2/devices |
| *verb* | GET |
| *header* | Authorization: “Bearer **{access\_token\_value}**” |

|  |  |
| --- | --- |
| ***Response*** | |
| ***Code*** | ***Description*** |
| 200 | Response body:  [     {         "id": "device\_1\_id",         "name": "device\_1\_name",         "sip": {},         "push": {},         "media": {             "audio": {                 "codecs": []             },             "video": {                 "codecs": []             },             "encryption": {},             "webrtc": false         },         "device\_type": "softphone",         "enabled": false     },  ] |
| 400 | The information sent is invalid. |
| 500 | Internal server error |
