def METHOD_NAME(force_refresh = False):
    """
    Gets the API access token to access any Keycloak-protected API.
    """
    global ACCESS_TOKEN
    if ACCESS_TOKEN and not force_refresh:
        return ACCESS_TOKEN
    # get an access token from keycloak
    payload = {"grant_type":"client_credentials",
            "client_id":"admin-client",
            "client_secret": get_admin_secret()}
    url = "{}/realms/shasta/protocol/openid-connect/token".format(get_auth_gateway_uri())
    try:
        r = requests.post(url, data = payload, verify = False)
    except Exception as err:
        print(f"An unanticipated exception occurred while retrieving gateway token {err}")
        logging.error(f"An unanticipated exception occurred while retrieving gateway token {err}")
        raise CsmApiError from None
    # if the token was not provided, log the problem
    if r.status_code != 200:
        print(f"Error retrieving gateway token: keycloak return code: {r.status_code}"
            f" text: {r.text}")
        logging.error(f"Error retrieving gateway token: keycloak return code: {r.status_code}"
            f" text: {r.text}")
        raise CsmApiError from None
    # pull the access token from the return data
    ACCESS_TOKEN = r.json()['access_token']
    return ACCESS_TOKEN