-
Notifications
You must be signed in to change notification settings - Fork 1
Description
What is the problem that this feature solves?
We have existing user accounts in FusionPBX assigned to our customers, and those users can generate API keys to interact with FusionPBX via API.
For data services (eg: phone number lookups) and other ancillary services outside of FusionPBX, we should use this key for authentication.
Describe the solution you'd like
In the v_users table in postgres this would be api_key https://github.com/fusionpbx/fusionpbx/blob/0d0872a0a3b0729a4b1f04df20b6138716916bd0/core/users/app_config.php#L261
For services that require restricting what phone number a user is accessing (or to show them only data related to their phone number), we should go into v_destinations and use the destination_number which is the plain 10 digit phone number https://github.com/fusionpbx/fusionpbx/blob/0d0872a0a3b0729a4b1f04df20b6138716916bd0/app/destinations/app_defaults.php#L156
Note that for the phone number we should match cases where its a substring, like +12065551234 and 12065551234 as the FusionPBX database generally stores these as 2065551234 without the plus or country code prefix.
How will this improve revenue or reduce our costs?
Not having this feature is limiting our ability to sell data products.