August 6, 2020
October 5, 2010
Hi Peter,
If you haven't already, please read these posts on API's and Power Query
Getting Started with API's in Power Query • My Online Training Hub
Connecting to an OAuth API Like PayPal With Power Query • My Online Training Hub
The API you are trying to use uses OAuth as an authentication process - that's the process of registering an application (like Power Query) to use the API. To get data from the API you need to generate an access token. You can do this on the fraport.de web site. On the same page where you generated the consumer key & secret, you can generate an access token.
Usually you can create the access token from within PQ too but I didn't see the mechanism described in their documentation on how to do this, so you'll have to generate tokens via the site for now.
If you open the attached workbook I've modified the query from the Paypal API blog post (linked above). I created an account on fraport, registered an app and generated my own token by following these instructions
Using my own access token I was then able to query the API to get this data - see attached image.
If you edit the query in my workbook, and enter your own access token, you should be able to get similar data. You'll need to modify the URL end point to get data for other things
Give it a go and if you get stuck, post back here.
Regards
Phil
August 6, 2020
Hi Phil,
thank you very much for your very well described answer.
Your link to the Paypal API blog post was really helpful as well and now I understand that I have to use the advanced query editor in order to type in my credentials <- this was my main issue!
I will use your example file in order to understand the M statement.
All the best
Peter
1 Guest(s)