youtube-api on JavaScript backend - youtube

After 2 weeks that I was using that API correctly and I have upload a few video on YouTube, today I receive this error when I try to get a new access token:
Error 400: invalid_scope
Some requested scopes were invalid. {invalid=[https://googleapis.com/auth/youtube.upload]}
Also with the old access token that was working yesterday, now I cannot proceed..
Now I can think that YouTube for some reason have blocked me or something like that because I haven't changed the code.. Anyone have experienced something like this? How I can proceed? At least I want to know if I was 'blocked' and for what reason.

Related

InternalOAuthError: Failed to obtain access token using passportjs

I am using https://github.com/jaredhanson/passport-oauth2 as my library to authenticate via Instagram, and everything was working fine until this error spontaneously occurred 2 days ago with no explanation as to why it has failed to obtain the access token.
My client IDs and secrets are correct and my client app is live according to instagram/developers. Is there some known solution to this? I haven't changed my code since I got this error so it can't be on my side especially since the error seems to be from the library but that hasn't been updated in a while either.
Any help? Thanks!

YouTube Analytics API : 403 Forbidden Error returns Earnings Report

I have a CMS account an I'm trying to get earnings data from content owners report on Analytics API using OAuth 2.0 . Whenever I'm trying to do this through my website, I get the following error ;
Error calling GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=contentOwner%3D%3DContentOwnerID&start-date=2005-01-01&end-date=2015-11-26&metrics=views%2Cearnings%2Clikes%2Cdislikes%2Cshares%2Ccomments&dimensions=30DayTotals&filters=channel%3D%3DChannel_ID: (403) Forbidden
I'm doing the same thing on TRY IT page and it works fine.
I'm thinking that I'm having issues with authenticating my domain. What do you think is the problem? How can I solve this issue?
Thank you,
403 means nobody has access to a page. As you noticed, you may have access to a similar page, but not to this one. It is not a matter of authentication. Authentication problems give a status 401 (meaning it can be fixed by adding proper authentication); 403 cannot be fixed.
Finally, I solved the problem..
Whoever will have this issue, please use the CMS user's OAuth 2.0 credentials instead of using channel credentials..

Microsoft oauth login stopped working all of a sudden?

I use Oauth via Microsoft and it has worked fine for a while, then a couple of weeks ago (can't remember exactly when) i got some tweet or something from someone saying that they had problems signing in with MS Oauth.
The error i get is this.
https://login.live.com/err.srf?lc=1033#error=invalid_request&error_description=The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.
The page actually says
"We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later."
And that indicates that they may actually have some issues but i think it's been like this for a while so i suspect it's just some generic error.
If i look at my request it says.
client_id=[MY CLIENT ID]&scope=wl.basic&response_type=code&redirect_uri=http://dev.ohso.se/login/ExternalLoginCallback/?provider=microsoft&sid=[some id]
I do get the same error on both my dev app and the production app i have setup.
This is how my callback URLs look like. I have tried to add URLS both with ExternalLoginCallback and externallogincallback but it doesn't seems to work. It looks like it's saved but it's gone when you return to the page.
Anyone know how to contat MS to at least report this bug and maybe also get hold of someone that can help debug my problem?
/Ola
OK, got it. The issue is with your request URL, remove / character from ..back/?provid.... Your request URL should be
client_id=[MY CLIENT ID]&scope=wl.basic&response_type=code&redirect_uri=http://dev.ohso.se/login/ExternalLoginCallback?provider=microsoft&sid=[some id]
and you can have any redirect URL #MS
http://dev.ohso.se/login/ExternalLoginCallback
or
http://dev.ohso.se/login/ExternalLoginCallback/

Twitter API 401 - weird

ยจ
I have a weird reponse from Twitter API. It's Error 401: Unauthorized, but the weird thing is, that it has worked before.
I created a twitter app several days before and generate access token by twitter developers portal. Everything works fine for 18 hours. Then, the service reports 401. Today, I created a new app and update the access settings - consumer key, access token and so on. I did one API call and everything worked fine. But after next request, twitter returned 401.
I have read a lot scenarios when the twitter returns 401 error but I don't know why Twitter returns the error to me.
Thanks for help.
I may sound silly but please check if date and time of the PC or server where the app is installed.
For example if you set your timezone as GMT in your PC then your PC must have exact time of GMT else twitter API will through error. Please check it.
Thanks

Posting to tumblr using API v2 on iOS returning error

I recently got oAuth working for my iOS app to log in to Tumblr. Now I'm having trouble posting using the new API calls. I'm able to generate a request and prepare Autorization headers but I'm still getting errors.
Here is my URL:
http://api.tumblr.com/v2/blog/my_blog.tumblr.com/post?tweet=no&tags=my%2C%20app&state=published&type=text&title=Hello&body=I%2520finally%2520got%2520this%2520to%2520work
Here is my Authorization header with x's in place of sensitive info:
Authorization = "OAuth realm=\"\", oauth_consumer_key=\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", oauth_token=\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\", oauth_signature_method=\"HMAC-SHA1\", oauth_signature=\"XXXXXXXXXXXXXXXXXXXXXXXXX\", oauth_timestamp=\"1347656207\", oauth_nonce=\"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\", oauth_version=\"1.0\"";
There error I receive:
{"meta":{"status":400,"msg":"Bad Request"},"response":{"errors":["Post cannot be empty."]}}
Does anyone have experience with this? I've been working at it for at least 20 hours over a two day period.
Any help is greatly appreciated.
EDIT: I've also tried including authorization data in the url (i.e., oauth_token, oauth_consumer_key), essentially the stuff found in the header. When I do this I get a 401 "Not Authorized" error, which I know isn't correct because I just successfully called "http://api.tumblr.com/v2/user/info" which requires a valid authorization.
found solution, see explanation here.

Resources