6.4.1 Signup API [VUC3]
Configuration
The sign up configuration is stored in the VUC\App_Config\AppSettings.config file. Below is an example configuration:
<add key="PbxSignupPayment" value="PayPal" />
<add key="PbxSignupTransactionType" value="plan_pack_subscription" />
<add key="PbxSignupPlanFreeId" value="1" />
<add key="PbxSignupFreeMaxClients" value="5" />
<add key="PbxSignupRegisterMessageTitle" value="VUC new account confirmation" />
<add key="PbxSignupRegisterMessageBody" value="file://Content/CompanySignup/confirmation_email.html" />
<add key="PbxSignupWelcomeMessageTitle" value="Welcome to VUC" />
<add key="PbxSignupWelcomeMessageBody" value="file://Content/CompanySignup/welcome_email.html"/>
<add key="PbxSignupWelcomePremiumMessageBody" value="file://Content/CompanySignup/welcome_email_premium.html"/>
<add key="NewClientCodecs" value="4194315"/>
<add key="NewClientPrimaryCodec" value="23"/>
<add key="NewClientVideoCodecs" value="16"/>
<add key="NewClientPrimaryVideoCodec" value="5"/>
<add key="NewClientType" value="262145"/>
PbxSignupPayment - defines the payment provider name. Must be the same name as configured in the Onlineshop payments.config file - learn more here.
PbxSignupTransactionType - specifies the actions performed after creating the account. The plan_pack_subscription value makes the platform assign a package to the account. If you want to assign a plan then set plan_subscription value.
PbxSignupPlanFreeId - Id of the plan, from the voipswitch.plans table, to be assigned to the accounts that are created using api/CompanyTrialSignup
PbxSignupFreeMaxClients - number of allowed sub user accounts assigned to the trial company account
The codecs related keys are responsible for setting proper codecs configuration for the newly created clients, by default the audio codecs are Opus (primary), g729, g711 a and u. The video codec is VP8.
The other keys refer to the emails which are sent during the account creation:
- Keys with Register in name relate to the registration email with activation link
- Keys with Welcome in name relate to the email sent after account has been created
API
POST api/CompanyTrialSignup | creates non active trial company, sends confirmation email JSON parameter: CompanySignupModel: { "email": "sample string 1", "password": "sample string 2", "name": "sample string 3", "lastName": "sample string 4", "company": "sample string 5" } returns: HTTP status (200 if success) |
GET api/CompanyTrialSignup | activates a trial company and sends welcome emailapi/CompanyTrialSignup?token={token} url with token is send in activation email returns: HTTP status |
POST api/DidSelect | gets lists from DIDs Manager for select country, area and DID number, JSON parameter: DidOptionsModel: { "Country": { "Id": 1, "Name": "sample string 2", "Code": "sample string 3", "PhoneCode": "sample string 4" }, "Area": { "Code": "sample string 1", "Name": "sample string 2", "LocalAreaId": 3 }, "Number": "sample string 1", "Step": "sample string 2", "AutoSelect": true, "Login": "sample string 4" } Step: ['country', 'area', 'number'] AutoSelect: if true and if items count is 1 selects single value and makes next request returns: DidSelectModel: { "DidOptions": {}, "Items": [] } Items: list of values according to the current DidOptions.Step |
POST api/CompanySignup | creates non active company, call before onlineshop transaction JSON parameter: CompanySignupModel: { "email": "sample string 1", "password": "sample string 2", "name": "sample string 3", "lastName": "sample string 4", "company": "sample string 5", "persons": 6, "planId": 7 } persons: number of users planId: plan pack id returns: [] |
GET api/CompanySignup | activates a company and sends welcome email, call after successfull onlineshop transaction api/CompanySignup?login={login} login : compnay owners login/email returns: HTTP status |
PUT api/CompanySignup | activates a company, sends welcome email, assigns selected did and creates default autoattendant scenario call after successfull onlineshop transaction JSON parameter: DidOptionsModel: {} DidOptionsModel.*: described above DidOptionsModel.Number: selected DID number DidOptionsModel.Login: compnay owners login/email returns: HTTP status |
Email templates
Email templates are files located in VUC/Content/CompanySignup. File names are defined in AppSettings.config
Variables
[EMAIL]
[PASSWORD]
[COMPANY]
[FIRST_NAME]
[LAST_NAME]
[SIGNUP_TOKEN]
[DID]