migueesc123 / YoutubeAnalytics

A Microsoft Data Connector or Power Query Connector for YoutubeAnalytics data
MIT License
61 stars 21 forks source link

Try replacing redirectUrl = "http://127.0.0.1:81"; #1

Closed Hugoberry closed 7 years ago

Hugoberry commented 7 years ago

Haven't tried your connector yet but I assume something around the authorization might fail at some point. Have you tried using redirectURL = "https://preview.powerbi.com/views/oauthredirect.html" instead of redirectUrl = "http://127.0.0.1:81"; ?

migueesc123 commented 7 years ago

Crazy stuff, I know! I had to use that localhost as stated by the YouTube API Documentation here> https://developers.google.com/youtube/v3/guides/auth/installed-apps

Originally I was using "urn:ietf:wg:oauth:2.0:oob", but the API handles that differently than how others examples that I've seen.

Def try it out!

migueesc123 commented 7 years ago

hey! @Hugoberry I've tried to replace it with the one provided by MSFT (the preview.powerbi.com), but sadly Google is just not having any of it. I get an error saying that there's a mismatch in the url. It appears to be something that only happens with Google APIs.

According to Google, the recommended way is to set up a "Custom URI scheme", but that would require each extension user to create their own custom URI, which would translate into ton of work and would make this extension not so easy to share or even adopted by anyone.

migueesc123 commented 7 years ago

@Hugoberry you were absolutely right. My bad. It appears that I was using the incorrect "application type".