# Create Webmail session for current user Create a temporary session to connect to Webmail for the authenticated cPanel user. ### How to use this API After you successfully call this API, you will need to log in to Webmail. To do this, send an HTTP POST to with a message body of where: * represents the value from the return. * If the return value is , enter the hostname of the server that answered the API function. * represents the value from the token return. * represents the value of the session return. For example, an HTTP POST may resemble the following: With a message body of: Endpoint: GET /Session/create_webmail_session_for_self Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `locale` (string) The locale that the new session will use. Use UAPI to see a list of valid locales. * You must enter lowercase characters. * This parameter defaults to the cPanel user's locale. Example: "en" - `remote_address` (string) The session's client IP address. * If you run this function from the command line, this parameter is . * This parameter defaults to the API caller's IP address. Example: "192.168.0.1" ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "create_webmail_session_for_self" - `module` (string) The name of the module called. Example: "Session" - `result` (object) - `result.data` (object) - `result.data.hostname` (string,null) The Webmail server's hostname. The function returns a value when the Webmail server is remote. Example: "hostname.example.com" - `result.data.session` (string) The session value to submit via POST to begin using the new session. Example: "username:D7NiAZv1nf4bXeg9:CREATE_WEBMAIL_SESSION_FOR_SELF,728fb86a7df1cf20690c65f349ac3137" - `result.data.token` (string) A new security token. Example: "/cpsess2462418786" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.metadata.transformed` (integer) Post-processing may have transformed the data. Enum: 1 - `result.status` (integer) - 1 - Success - 0 - Failed: Check the errors field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.