switchvox.users.getMyInfo
Description
All user API requests require an extension and password for authentication and almost all user API requests also require the extension's account_id as a parameter. Use this method, which doesn't require an account_id, to return the account_id of the extension used in the user authentication.Â
If you (the developer) are writing an application for a user, then you would collect their login information (extension/password) and call this API method. If the login fails, this method will return a fault which you can then display to the user letting them know their extension/password is incorrect. If their login succeeds, this method will return information about the extension, including the account_id. This account_id should be stored by the application along with their user name and password for future API calls.
Â
Arguments
This method doesn't take any parameters.
Â
Example
Request
Gets information about the extension used in the authentication credentials (301 in this case)
<request method="switchvox.users.getMyInfo">
<parameters/>
</request>
Response
Returns 301's information
<response method="switchvox.users.getMyInfo">
<result>
<extension number="301" status="1" can_dial_from_ivr="1" account_id="1106" display="Tester 1" date_created="2008-10-30 15:06:14" type="sip" type_display="SIP Extension" first_name="Tester" last_name="1" email_address="dwp@switchvox.com" template_id="1" template_name="Default" />
</result>
</response>