Liblinphone
5.5.0
|
Creates and manage SIP user accounts remotely, using the REST API of the Flexisip Account Manager. More...
#include <account_manager_services.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | AccountManagerServices (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneAccountManagerServices * | cPtr () |
LINPHONECXX_PUBLIC std::string | getLanguage () const |
Gets the configurer preferred language, if set. More... | |
LINPHONECXX_PUBLIC void | setLanguage (const std::string &language) |
Sets the preferred language to get error messages from account manager (if supported, otherwise will be english). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createDeleteDeviceRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::shared_ptr< const linphone::AccountDevice > &device) |
Requests to delete a device from the list of currently known devices. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createGetAccountCreationRequestTokenRequest () |
Requests a an account creation request token that once validated using the URL returned by this method upon success, will allow you to call createGetAccountCreationTokenFromRequestTokenRequest() to obtain a valid account creation token. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createGetAccountCreationTokenFromRequestTokenRequest (const std::string &requestToken) |
Converts an account creation request token obtained by linphone_account_manager_services_request_account_creation_request_token to an account creation token. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createGetDevicesListRequest (const std::shared_ptr< const linphone::Address > &sipIdentity) |
Requests the list of devices currently known. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createLinkEmailToAccountUsingCodeRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &code) |
Validates the link between an email address and an account using a code received by email after calling createSendEmailLinkingCodeByEmailRequest() More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createLinkPhoneNumberToAccountUsingCodeRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &code) |
Validates the link between a phone number and an account using a code received by SMS after calling createSendPhoneNumberLinkingCodeBySmsRequest() More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createNewAccountUsingTokenRequest (const std::string &username, const std::string &password, const std::string &algorithm, const std::string &token) |
Creates an account using an account creation token, for example obtained using createSendAccountCreationTokenByPushRequest(). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createSendAccountCreationTokenByPushRequest (const std::string &pnProvider, const std::string &pnParam, const std::string &pnPrid) |
Requests a push notification to be sent to device, containing a valid account creation token. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createSendAccountRecoveryTokenByPushRequest (const std::string &pnProvider, const std::string &pnParam, const std::string &pnPrid) |
Requests a push notification to be sent to device, containing a valid account recovery token. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createSendEmailLinkingCodeByEmailRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &emailAddress) |
Requests a code to be sent to a given email address, that can be used later to associate said email to an account using createLinkEmailToAccountUsingCodeRequest(). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::AccountManagerServicesRequest > | createSendPhoneNumberLinkingCodeBySmsRequest (const std::shared_ptr< const linphone::Address > &sipIdentity, const std::string &phoneNumber) |
Requests a code to be sent to a given phone number, that can be used later to associate said phone number to an account using createLinkPhoneNumberToAccountUsingCodeRequest(). More... | |
Creates and manage SIP user accounts remotely, using the REST API of the Flexisip Account Manager.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createDeleteDeviceRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity, |
const std::shared_ptr< const linphone::AccountDevice > & | device | ||
) |
Requests to delete a device from the list of currently known devices.
sipIdentity | the SIP identity URI that identifies your account for which you want the devices list. |
device | the AccountDevice to delete. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetAccountCreationRequestTokenRequest | ( | ) |
Requests a an account creation request token that once validated using the URL returned by this method upon success, will allow you to call createGetAccountCreationTokenFromRequestTokenRequest() to obtain a valid account creation token.
Once the account creation token is obtained, you can call createNewAccountUsingTokenRequest().
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetAccountCreationTokenFromRequestTokenRequest | ( | const std::string & | requestToken | ) |
Converts an account creation request token obtained by linphone_account_manager_services_request_account_creation_request_token to an account creation token.
The obtained token can be used to call createNewAccountUsingTokenRequest().
requestToken | the token obtained previously and validated using your web browser. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createGetDevicesListRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity | ) |
Requests the list of devices currently known.
sipIdentity | the SIP identity URI that identifies your account for which you want the devices list. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createLinkEmailToAccountUsingCodeRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity, |
const std::string & | code | ||
) |
Validates the link between an email address and an account using a code received by email after calling createSendEmailLinkingCodeByEmailRequest()
sipIdentity | the SIP identity URI that identifies the account to which you want to link the email address to. |
code | the code received by email. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createLinkPhoneNumberToAccountUsingCodeRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity, |
const std::string & | code | ||
) |
Validates the link between a phone number and an account using a code received by SMS after calling createSendPhoneNumberLinkingCodeBySmsRequest()
sipIdentity | the SIP identity URI that identifies the account to which you want to link the phone number to. |
code | the code received by SMS. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createNewAccountUsingTokenRequest | ( | const std::string & | username, |
const std::string & | password, | ||
const std::string & | algorithm, | ||
const std::string & | token | ||
) |
Creates an account using an account creation token, for example obtained using createSendAccountCreationTokenByPushRequest().
username | the username of the newly created account. |
password | the password to use for the newly created account. |
algorithm | the algorithm to use to hash the password (must be either MD5 or SHA-256). |
token | the account creation token obtained previously. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendAccountCreationTokenByPushRequest | ( | const std::string & | pnProvider, |
const std::string & | pnParam, | ||
const std::string & | pnPrid | ||
) |
Requests a push notification to be sent to device, containing a valid account creation token.
Provider, param & prid can be obtained from Core::getPushNotificationConfig(), but on iOS may need some modifications (depending on debug mode for example). Once the token is obtained, you can call createNewAccountUsingTokenRequest().
pnProvider | The provider, for example "apns.dev". |
pnParam | The parameters, for example "ABCD1234.org.linphone.phone.remote". |
pnPrid | The prid, also known as push token. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendAccountRecoveryTokenByPushRequest | ( | const std::string & | pnProvider, |
const std::string & | pnParam, | ||
const std::string & | pnPrid | ||
) |
Requests a push notification to be sent to device, containing a valid account recovery token.
Provider, param & prid can be obtained from Core::getPushNotificationConfig(), but on iOS may need some modifications (depending on debug mode for example). Once the token is obtained, you can use it to open the recovery webpage on the flexisip account manager at https://account_manager.domain.tld/recovery/phone/<recovery token>="">?phone=<phone number>="">
pnProvider | The provider, for example "apns.dev". |
pnParam | The parameters, for example "ABCD1234.org.linphone.phone.remote". |
pnPrid | The prid, also known as push token. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendEmailLinkingCodeByEmailRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity, |
const std::string & | emailAddress | ||
) |
Requests a code to be sent to a given email address, that can be used later to associate said email to an account using createLinkEmailToAccountUsingCodeRequest().
sipIdentity | the SIP identity URI that identifies the account to which you want to link the email address to. |
emailAddress | the email address to which to send the code to. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::AccountManagerServicesRequest> linphone::AccountManagerServices::createSendPhoneNumberLinkingCodeBySmsRequest | ( | const std::shared_ptr< const linphone::Address > & | sipIdentity, |
const std::string & | phoneNumber | ||
) |
Requests a code to be sent to a given phone number, that can be used later to associate said phone number to an account using createLinkPhoneNumberToAccountUsingCodeRequest().
sipIdentity | the SIP identity URI that identifies the account to which you want to link the phone number to. |
phoneNumber | the phone number to which to send the code by SMS. |
LINPHONECXX_PUBLIC std::string linphone::AccountManagerServices::getLanguage | ( | ) | const |
Gets the configurer preferred language, if set.
LINPHONECXX_PUBLIC void linphone::AccountManagerServices::setLanguage | ( | const std::string & | language | ) |
Sets the preferred language to get error messages from account manager (if supported, otherwise will be english).
language | The language (en, fr, etc...) you'd like to have error messages in (if possible). |