xero

Get XERO API Access code error: unsupported_grant_type

Get XERO API Access code error: unsupported_grant_type Question: I’m trying to get accessToken from Xero This is their instruction: https://developer.xero.com/documentation/guides/oauth2/auth-flow/#3-exchange-the-code POST https://identity.xero.com/connect/token authorization: "Basic " + base64encode(client_id + ":" + client_secret) Content-Type: application/x-www-form-urlencoded grant_type=authorization_code &code=xxxxxx &redirect_uri=https://myapp.com/redirect This is how I do it: tokenb4 = "{0}:{1}".format(CLIENT_ID, CLIENT_SECRET) basic_token = base64.urlsafe_b64encode(tokenb4.encode()).decode() response = requests.post( "https://identity.xero.com/connect/token", headers={ "Authorization": …

Total answers: 2