import requests


def get_access_token(inrix_creds):
    """Get access token to use with Inrix Roadway Analytics Data Downloader API.
    
    Args:
        inrix_creds (json)
    Returns:
        The accessToken from the API response
        Note the API response contains other types of tokens, but are not used here
    More info: 
        See Step 1 of the INRIX Roadway Analytics Data Downloader API documentation
    """
    endpoint = "https://roadway-analytics-api.inrix.com/v1/auth"
    r = requests.post(endpoint, json=inrix_creds)
    r.raise_for_status()
    return r.json()["result"]["accessToken"]["token"]