Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 2.42 KB

UserApi.md

File metadata and controls

78 lines (56 loc) · 2.42 KB

mailinabox_api.UserApi

All URIs are relative to https://box.example.com/admin

Method HTTP request Description
get_me GET /me Get user information

get_me

MeResponse get_me()

Get user information

Returns user information. Used for user authentication. Authenticate a user by supplying the auth token as a base64 encoded string in format email:password using basic authentication headers. If successful, a long-lived api_key is returned which can be used for subsequent requests to the API.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import mailinabox_api
from mailinabox_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://box.example.com/admin
# See configuration.py for a list of all supported configuration parameters.
configuration = mailinabox_api.Configuration(
    host = "https://box.example.com/admin"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = mailinabox_api.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Enter a context with an instance of the API client
with mailinabox_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = mailinabox_api.UserApi(api_client)
    
    try:
        # Get user information
        api_response = api_instance.get_me()
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UserApi->get_me: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

MeResponse

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful operation -

[Back to top] [Back to API list] [Back to Model list] [Back to README]