Update get_access_token function to latest version