Cannot get a access token


Hi guys, I use a standalone version . I cannot get a access token, but Enterprise Edition only , so could you help me please? I want use the REST API ,and it is always return HTTP code 401.

In Python I do this:

def get_token(*, username, password, base_url):
    _data = {
        'userName': username,
        'password': password
    }
    login_url = f'{base_url}/apiv2/login'
    print(login_url)
    response = requests.post(login_url, json=_data)
    return response.json()['token']
token = get_token(username='my_user', password='my_pass', base_url='http://dremio:9047'

Then I include the token in the header for each http request.

PS: using this with Community Edition

@shawn Are you able to provide the REST API call you are making?