Parsing the http response and retrieving the access token