Hi Bubblers,
I am working on a Web App in which I am allowing users to connect their XERO account so that their Invoices can be fetched from Company/Organization that they have created in XERO.
For this I created a XERO account and could see the Demo Organization pre-created in there. I also logged on to the XERO Developer account with the same account, created an App there and got the Client ID and Secret from there.
I redirected users to this URL for OAuth process completion:
A button click on my page redirects users to XERO where they are asked to login to their XERO account, select an organization and returns with CODE to the redirect_uri.
In the next step, I try to utilize this CODE to get access token. This is the complete request that I am using:
POST https://identity.xero.com/connect/token
Authorization: Basic Base64encoded(ClientID:Secret)
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code=CODE
&redirect_uri=My_REDIRECT_URI
Everytime I run this request via Bubble’s API connector, I get this error:
I don’t know what the issue is. I have generated CODE multiple times. The Client ID and Secret that I use for encoding are exactly the same as shown in the app that I created on XERO Development portal. I have used multiple sources for base 64 endoing and matched them all so I don’t think there’s any issue in encoding as well.
Whoever has had a chance on XERO-Bubble integration, your help in this regard would be highly appreciated. Thanks