403 Forbidden error when using YouTube API - youtube-api

I am getting this error while trying the Youtube API
Why does it say so?

Please, replace your token into [YOUR_ACCESS_TOKEN] in the curl

Related

Getting oembed using YoutubeURL returns 403 Forbidden

For A few days, I have suddenly become receiving the 403 Forbidden response from https://www.youtube.com/oembed?url={youtubeURl}.
I have checked documents for Youtube API but I can't find that it has restrictions for getting oembed and has authorization too. I can only see a restriction for Youtube Data API.
Why do I get the 403 Forbidden response from this API...?
Sample sending request:
https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=qK5tNXJ6Ibo
Are you sure that you are making the requests as https ? The code I have been using is fairly legacy and when I went down through it the requests were http. Once I updated the code to make the call over https it stopped getting 403 errors. Seems this was just recently changed a couple days ago.

issue while calling zendesk real time chat api

can anyone help me I am trying to call below request
curl https://rtm.zopim.com/stream/{resource} \
-H "Authorization: Bearer {API access token}"
initially, I tried with basic auth (adding id : password in the request) response was unauthorized,
then I generate access token with postman like in below screenshot
and when call API with that access token then the response is 403 forbidden
I can successfully hit and get response other api like ( https://www.zopim.com/api/v2/chats) with the same access token
but not the specific "rtm.zopim.com/stream/"
The Real Time Chat API is available on Enterprise plans only, so if you are not on the Enterprise plan you will receive a 403 Forbidden error.

Twitter API v1.1 Mentions Timeline getting 403 Forbidden

I am using following Mentions Timeline API : -
https://api.twitter.com/1.1/statuses/mentions_timeline.json
I am performing authenticated API call for Mentions and using the application (tokens).
But, getting 403 Forbidden as response when i call authenticated Mentions API. prior of 14 Jan 2014 this Mentions API was working fine. after that it is returning 403 error.
I am getting response when i call following API authenticated with same application tokens: -
https://api.twitter.com/1/users/show.json?screen_name=XXXXX
Can anyone tell me why i am receiving response - 403 Forbidden for Mentions Timeline only not in other API calls
Thanks,
Ketan
Jan 14th is the day Twitter API switched to requiring SSL/TLS. This discussion has the details:
https://dev.twitter.com/discussions/24239
Based on your description, you should check your URLs to ensure they're set to "https://..." instead of "http://...".
Migrate to https://api.twitter.com/1.1/users/show.json
is now work endpoint for GET users/show.
403 Forbidden for Mentions Timeline it error mean invalidate token check authentication it requite oauth.

IOS - Linkedin integration for oauth2.0 with google oauth library -- Got 404 error(page not found)

I am using google OAuth2.0 for LinkedIn integration in IOS. But I got 404 error when app try to get the accesstoken. Can you have a look at it and give me some guidance? Thanks in advance
I have tracked the request and have them below:
Generate the authorization code, the http request like below:
https://www.linkedin.com/uas/oauth2/authorization?client_id=dqabmvt35aee&redirect_uri=http%3A%2F%2Fwww.google.com%2FOAuthCallback&response_type=code&scope=r_emailaddress&state=DCEEFWF45453sdffef424
Then get the redirect URI like:
http://www.google.com/OAuthCallback?code=AQRnqUBueoz5jZqolVl5suiUQFnLExkmRQSOdndgFK59t4cKC4EjUm38zTbXjDvLwWItUrYrXnOt6KRxTz_SZ5m0Qq3t9rZHG1q-aqltb79m7ZJ5K2Y&state=DCEEFWF45453sdffef424
Do the post request for getting accessToken
https://www.linkedin.com/uas/oauth2/accessToken/
Request body like:
client_id=dqabmvt35aee
&client_secret=tlsAaUCZ5XtrTfHz
&code=AQRnqUBueoz5jZqolVl5suiUQFnLExkmRQSOdndgFK59t4cKC4EjUm38zTbXjDvLwWItUrYrXnOt6KRxTz_SZ5m0Qq3t9rZHG1qaqltb79m7ZJ5K2Y
&grant_type=authorization_code
&redirect_uri=http%3A%2F%2Fwww.google.com%2FOAuthCallback
And the got 404 error here.
Finally I figured it out by myself. What caused this issue is about the access token URL. I have the SLASH end of this URL which caused this issue. In google oauth 2.0 library, we should set the accesstoken url like "https://www.linkedin.com/uas/oauth2/accessToken", not should be "https://www.linkedin.com/uas/oauth2/accessToken/"

error to use "https://www.googleapis.com/auth/drive" scope

Version of google-api-java-client:
google-api-1.13.2-beta.jar
Java environment:
Java 6
Describe the problem.
I have a question.
I want to access the Google Drive using the OAuth 2.0 for Devices.
It is an error to use "https://www.googleapis.com/auth/drive" scope.
I succeed when you use the "https://docs.google.com/feeds/" in scope.
I'm wondering do I use the "https://docs.google.com/feeds/" to use the "DriveAPI" I.
Is this the correct usage?
Request:
POST https://accounts.google.com/o/oauth2/device/code HTTP/1.1
client_id=xxxxx.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/drive
Response: { "error" : "invalid_scope" }
Response:
POST https://accounts.google.com/o/oauth2/device/code HTTP/1.1
client_id=xxxxx.apps.googleusercontent.com&scope=https://docs.google.com/feeds/
Response:
{
"device_code" : "4/e6HcZHKPz-eExgLb_Ll9V8qoT1NP",
"user_code" : "zzwiv48b",
"verification_url" : "http://www.google.com/device",
"expires_in" : 1800,
"interval" : 5
}
How would you expect it to be fixed?
I think that can be authenticated in the scope of the "https://www.googleapis.com/auth/drive" I.
developers.google.com
stackoverflow.com
You are missing an h in the protocol. Try https://docs.google.com/feeds/ instead of ttps://docs.google.com/feeds/. Apply the same change to all your scope urls
From the Google documentation about "Using OAuth 2.0 for Devices" (https://developers.google.com/identity/protocols/OAuth2ForDevices#allowedscopes):
When you use the OAuth 2.0 flow for devices, you can access only the following scopes:
Analytics Configuration and Reporting APIs
Calendar API
Contacts API
Cloud Print API
Cloud Storage API
Fitness REST API
Fusion Tables API
Google Sign-In
YouTube Data and Live Streaming APIs
I don't see Drive API in this list and I think it's a reason of "invalid_scope" error
I have exactly the same problem with.
I've followed the instructions in the developing document, and use "www.googleapis.com/auth/drive" as my the scope in the request.
Eventually, I got "invalid_scope" in the response.
So I've try to use "www.googleapis.com/auth/devstorage.full_control" as the scope, and it worked!The hint is from :https://cloud.google.com/storage/docs/authentication#oauth
BUT!! When I use the access token I created to list the google drive account information, I got error code 403 and the message is "Insufficient Permission".
This is what I used to request the account infornation:
curl -H "Authorization: Bearer $ACCESS_TOKEN" https://www.googleapis.com/drive/v2/about?key=$APP_KEY
That really made me confused....

Resources