Login

HTTP Request

POST /user/login

Authorization

Basic authentication with username and password.

KEY
TYPE
VALUE

username

String

Username

password

String

Password

Sample code.

def basic_auth(username, password):
    token = b64encode(f"{username}:{password}".encode('utf-8')).decode("ascii")
    return f'Basic {token}'

#then connect
headers = { 'Authorization' : basic_auth(username, password) }
url = f"{api_endpoint}/login"

response = requests.post(url, headers= headers)
response.json()

Parrot API

login_resp = parrot.login(username=username, password=password)

Response

Returns a new access token and other formation for further authentication.

Last updated

Was this helpful?