updated Access Token url and raise error if header contains 'X-Error'
returns parsed response and raise error if 'X-Error' header exists