automate get access token.