Xun Wang

02/11/2023, 10:24 PM
Saw an earlier thread about getting 401 error while trying to access /auth/login endpoint. But didn't see any resolution on that. Also, if I switch to requests.get, the response code will be 200 but not sure if i should use anything in the header as refresh_token and access_token. Feel something is left out of the document which is required to run the POST successfully. Any ideas?
def login():
    auth_token = 'pnu_xxxxxxxxxxxx'
    auth_header = {'Authorization': 'Bearer ' + auth_token}
    response = <|>('<>', headers=auth_header)