def is_unauthorized_response(response):
    """Checks if a response is unauthorized."""
    if response.status_code == 401:
        response_content = response.json()
        message = 'Authorization has been denied for this request.'
        if 'message' in response_content:
            if response_content['message'] == message:
                return True

    return False