I am trying to generate an access and a refresh token using the new Xero authorization via OAuth 2.0 in Postman but the response is always "error": "invalid_client".
I've been following the instructions on https://developer.xero.com/documentation/oauth2/auth-flow, creating the verification code required for generating the access token and using the same client_id which was used for creating the verification code.
Code request:
https://login.xero.com/identity/connect/authorize?response_type=code&client_id=81158066DB8B43A9AEF0DDDCCA627E80&redirect_uri=https://google.com&scope=offline_access openid profile email accounting.transactions&state=123
Response with code:
Access Token request:
Headers:
Authorization: "Basic " + base64encode(81158066DB8B43A9AEF0DDDCCA627E80 + ":" + mRbxQuOQ01S8twNg1wxdkwIzrtWN8HGUpYu9wy5kYgFJf2t-)
Content-Type: application/x-www-form-urlencoded
When I use Basic Auth in Postman the response is "error": "unsupported_grant_type".
Headers:
Authorization: Basic ODExNTgwNjZEQjhCNDNBOUFFRjBERERDQ0E2MjdFODA6ZE5YY0V2UldqX2YwdVY4X3cyLS1wOTFvZHpOM2doaWN3WnJVM05jUzJjR2VpQVBp
Content-Type: application/x-www-form-urlencoded
Any idea what mistake I am doing?