• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Connecting to PayPal in Power BI|Dashboards & Charts|Excel Forum|My Online Training Hub

You are here: Home / Connecting to PayPal in Power BI|Dashboards & Charts|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumDashboards & ChartsConnecting to PayPal in Power BI
sp_PrintTopic sp_TopicIcon
Connecting to PayPal in Power BI
Avatar
Falk Zedler

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 10, 2022
sp_UserOfflineSmall Offline
1
February 10, 2022 - 1:03 am
sp_Permalink sp_Print

Hey guys,

Im trying to connect to paypal from Poewr BI using the instructions of your article. Unfortunatally it is not working. May you help me?

I get an DataSource.Error: ... (400) ... : Bad Request

In Power BI there is a little button where I can jump directly to the error. It seems that the first part of the script is ok and that I am able to connect to paypal and get the token. The button takes me to 'data' so I think there is a problem with the url somewhere here in the code:

path = "v1/reporting/transactions",
startDate = "2021-11-01T00:00:00-0700",
endDate = "2022-01-01T00:00:00-0700",
fields = "all",

data = Json.Document(Web.Contents(api_url,
[
RelativePath = path,
Query = [end_date=endDate, start_Date=startDate, fields=fields],
Headers = [#"Authorization"="Bearer "&token,#"Content-Type"="application/json"]
]
)
),

I think that I used exactly your syntax. Can you explain to me what I am doing wrong?

Thanks,

Falk

Avatar
Falk Zedler

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 10, 2022
sp_UserOfflineSmall Offline
2
February 10, 2022 - 1:13 am
sp_Permalink sp_Print sp_EditHistory

Me again ...

It seems, that PowerQuery replaces the ":" in StartDate and EndDate into "%3A":

"https://api.paypal.com/v1/reporting/transactions?end_date=2022-01-01T00%3A00%3A00-0700&start_Date=2021-11-01T00%3A00%3A00-0700&fields=all"

Is maybe this the problem? If yes ... how can I fix it?

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 871
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
3
February 10, 2022 - 8:32 am
sp_Permalink sp_Print

Hello,

The %3A is the url encoding for colon (:). See the link for more info.
https://www.w3schools.com/tags.....encode.ASP

Br,
Anders

Avatar
Falk Zedler

Active Member
Members
Level 0
Forum Posts: 3
Member Since:
February 10, 2022
sp_UserOfflineSmall Offline
4
February 10, 2022 - 4:42 pm
sp_Permalink sp_Print

Hi Anders,

thanks for your answer. As you can see ... I'm a noob in these things.

So it seems that this isn't the problem. 

But then what?

Regards,

Falk

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
5
March 9, 2022 - 1:02 pm
sp_Permalink sp_Print sp_EditHistory

Hi Falk,

Are you trying to access the Sandbox or live data? 

If you are trying the Sandbox, I believe it only contains data that you put there by creating dummy transactions

PayPal sandbox testing guide

If you want to query your transactions you won't be able to do it in the Sandbox as it's not a mirror of your live account.  In this case, just use the live account, as long as you are only querying data you can't do any harm.

What url are you using to access the API?  The URL in your example code above (api.paypal.com) is out of date.  Seems Paypal changed it without notifying me/anyone?  I'll update my blog post.

Please check you are using the correct one

API requests (paypal.com)

Regards

Phil

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Kim Knox, Tiffany Kang
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Forum Stats:
Groups: 3
Forums: 24
Topics: 6221
Posts: 27285

 

Member Stats:
Guest Posters: 49
Members: 31908
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.