Xero released their Oauth2.0 authenticated access to their API recently.
I am trying to write some flows to use this.
If I use Postman to generate the access code and then use it in flow, all works fine.
However the code needs to be refreshed every 30 minutes.
Running the token refresh call in Postman works fine, however it fails in Flow. "error": "unsupported_grant_type"
"Authorization": "Basic Rjd..." - valid (checked) token
The body of the http call is :-
Can anyone shed any light on this please?
As it turns out yes. Yes I do have a typo! 🙂
Obviously because we this duplicated in the body (with correct spelling) this was not causing any issues but I have fixed it now in the header also.
Good to know there is at least more than one of us!! Should definitely share some learnings. I have created a maintenance records PowerApp that then creates invoices with multiple line item in Xero. It is going to save a lot of data entry time.
Absolutely. You have all of the encryption benefits and it is very easy to configure. Reach out if you have any issues but I don't expect that you will.
@Nebulas, this should probably go in a new thread, but i'll ask anyway!
I have my data in the dataverse in a newly created table. I can perform a Get Row, and filter down to the actual row and information I need. The output of Get Row is in JSON and I could parse the output.
If I wanted to retrieve just one of the columns value, for that row, what are the next steps?
PARSE JSON output of get row
initialize variable for the particular column and value
use the variable as needed?
some guidence would be tops.
I see to run into PA wanting to wrap everything in a for each loop
If you are using the 'Get Row by ID' dataverse connector then you shouldn't need to parse the JSON at all. You can simply then add an action after you 'Get Row by ID' for your 'HTTP' call and form the response from the dynamic content of the record retrieved in the output from 'Get Row by ID'. See my example from earlier post above.
If you wanted to stick with parsing first you could add a 'Select' action from Data Operation and then add the fields to the map. The first column is just a name you give it, then the second column add the value of the field from the output of your parse. But this is somewhat redundant due to my point above.
Here is a screenshot of my flow. The do until is simply until 'Status code' from the HTTP output is equal to 200. Note also that the two initialise variables are redundant also and were there for debugging to I could see the values being initialised.
Let me know if this helps.
Hi Martin, I am going through this post and it seems like you have accessed Xero API using MS Flow, from your comment I have understood that the initial authentication for Xero, which requires us to enter the email password for Xero cannot be done through the flow and I need to use Postman only to get that done?
Yes, authenticate in Postman. Save the values to data store (I used sharepoint) then use these to refresh the token every 15 mins I think.
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.