Forum Discussion
Using XML API as data source
Have you been able to get this to work?
I am trying something similar(March 2019), but I just cannot figure out how to pass an XML body correctly within the request to get back an authentication token(I need to send credentials or something similar). I tried a lot of stuff, but i keep getting invalid XML or when I use Text.ToBinary it gives me the error of text could not be converted to binary(or the other way).
I kind of stopped trying for the moment, but there must be a way. I cannot sleep with the thought that Power BI cannot make a Post request to an XML API, sending a XML body within the request, with credentials or something else.
I have experience as a programmer. But not with Power BI and or Power Query and the language it uses(M).
Therefor it could be me. I hope you fixed your problem.
An example of what I am trying to pass in the request to an API URL:
<request> <client>xxxx</client> <username>xxxx</username> <password>xxxx</password> </request>
This returns a response with a token and a time(see below).
<response> <valid>yes</valid> <token>xxxx</token> <validUntil>xxxx</validUntil> </response>
The reason I am doing this within power bi, is because the rest of the requests(when i have the token) are also post-requests, which need to send a XML body within the request.