Getting a 403 Forbidden Error for Youtube Data API

youtube api error 400
youtube api quota
access not configured. youtube data api has not been used in project
youtube api part
error 403 youtube
how to use youtube api
youtube api changes
youtube api pricing

I am getting a 403 forbidden error when making an API call to the YouTube Data API.

I have tried to generate different types of keys (Web Browser, Server, etc.). The key is unrestricted. I have tried making the call from a server and from postman for Chrome. The request URL and response is below.

https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q=surfing&key={api-key}

{
    "error": {
        "errors": [
            {
                "domain": "global",
                "reason": "forbidden",
                "message": "Forbidden"
            }
        ],
        "code": 403,
        "message": "Forbidden"
    }
}

Here are the headers:

alt-svc →quic=":443"; ma=2592000; v="43,42,41,39,35"
cache-control →private, max-age=0
content-encoding →gzip
content-length →118
content-type →application/json; charset=UTF-8
date →Tue, 10 Jul 2018 15:00:27 GMT
expires →Tue, 10 Jul 2018 15:00:27 GMT
server →GSE
status →403
vary →Origin, X-Origin
x-content-type-options →nosniff
x-frame-options →SAMEORIGIN
x-xss-protection →1; mode=block

This error is a Core API error as what specified in the Youtube API documentation.

Access forbidden. The request may not be properly authorized.

You can check the step by step guide provided in the documentation. You will bump with the step on how to properly acquire user authorization.

Intended for developers who want to write applications that interact with YouTube. It explains basic concepts of YouTube and of the API itself. It also provides an overview of the different functions that the API supports.

Error 403 Forbidden whith Youtube API V3, via the YouTube Data API, I always get a 403 forbidden error: https://www.​googleapis.com/youtube/v3/videos?id={video_id}&key={my_key}&part=snippet  Wasn't working for me either, was getting a 403 for accessing the youtube API. in the 'API Restrictions' on the APIs credentials page added it to restrict to the YouTube ABI, now it's working fine.

I tested this with multiple api-keys and I didn't hit an issue.

curl https://www.googleapis.com/youtube/v3/search\?part\=snippet\&maxResults\=1\&q\=surfing\&key\={api-key}
{
 "kind": "youtube#searchListResponse",
 "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/r9B676JRBM0twgG6dy2MZT_1KnQ\"",
 "nextPageToken": "CAEQAA",
 "regionCode": "US",
 "pageInfo": {
  "totalResults": 1000000,
  "resultsPerPage": 1
 },
 "items": [
  {
   "kind": "youtube#searchResult",
   "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/E8GZG_CZfJeaVF75eZYmJHnGe0c\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "rj7xMBxd5iY"
   },
   "snippet": {
    "publishedAt": "2017-11-12T11:09:52.000Z",
    "channelId": "UCiiFGfvlKvX3uzMovO3unaw",
    "title": "BIG WAVE SURFING COMPILATION 2017",
    "description": "BIG WAVE SURFING COMPILATION 2017 ** REVISED **AMAZING FOOTAGE ** WITH 60-100FT- HUGE SURF Please Subscribe if You Would like to see More ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/rj7xMBxd5iY/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/rj7xMBxd5iY/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/rj7xMBxd5iY/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Absolutely Flawless",
    "liveBroadcastContent": "none"
   }
  }
 ]
}

YouTube Data API: 403 forbidden error when accessing videos , A service error occurred: Error calling GET googleapis.com/youtube/partner/v1/​contentOwners?fetchMine=true: (403) Access Not Configured. A 403 Forbidden error is a particular type of error that occurs when trying to access a URL. If you're seeing a 403 Forbidden error, there are two possible causes. It could be due to a removal of

These types of error related to YouTube APIs core apis errors

Core API errors

forbidden (403) : Access forbidden :The request may not be properly authorized.

quotaExceeded (403) : quotaExceeded : The request cannot be completed because you have exceeded your quota.

You can try adding OAuth using this documentation on YouTube Data API Overview as a guide.

If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.

If you are getting the same error then , verify the YouTube Data API v3 service enabled for this key in your Google Developers console.

URL : https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q=surfing&key={API_KEY}

{
 "kind": "youtube#searchListResponse",
 "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/vxoFCv0dm4WdeKtXnUk7GXCJeao\"",
 "nextPageToken": "CAEQAA",
 "regionCode": "IN",
 "pageInfo": {
  "totalResults": 1000000,
  "resultsPerPage": 1
 },
 "items": [
  {
   "kind": "youtube#searchResult",
   "etag": "\"XI7nbFXulYBIpL0ayR_gDh3eu1k/Amykv1hEk5vzuqlcAS8z2BEptrU\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "CWYDxh7QD34"
   },
   "snippet": {
    "publishedAt": "2014-09-02T16:52:33.000Z",
    "channelId": "UCblfuW_4rakIf2h6aqANefA",
    "title": "Best surfing action from Red Bull Cape Fear 2014",
    "description": "Click for the FULL EVENT: http://www.redbullcapefear.com/ The southern tip of Sydney Australia is home to one of the most treacherous waves on the planet: ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/CWYDxh7QD34/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/CWYDxh7QD34/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/CWYDxh7QD34/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Red Bull",
    "liveBroadcastContent": "none"
   }
  }
 ]
}

Youtube Content ID API has not been used - error 403, I have been getting 403 forbidden errors returned from the Youtube API https://​www.googleapis.com/youtube/v3/search (403 Client Error:  An HTTP 403 response code means that a client is forbidden from accessing a valid URL. The server understands the request, but it won't fulfill the request due to client-side issues. API Gateway APIs can return 403 Forbidden responses for a variety of reasons:

I have had the same problem and it is resolved by enabling the 'YouTube Data API v3' from the API Library

Youtube API returns 403 forbidden error (exceeded quota) most of , I'm getting the following: Log: (Using YouTube API) 403 Forbidden Unknown YouTube Data API has not been used in project 341480211051 before or it is sites' SEO because Google might punish the ranking of sites with 403 errors. Recently, we were getting the following error in youtube-dl : ERROR: unable to download video data: HTTP Error 403: Forbidden We weren’t sure what that error meant

Links to YouTube videos: “403 Access Not Configured”, When we come across a term Quota in a Google API, it makes a strange feeling and buzz around many Questions like What if I exceed this limit  This feature is not available right now. Please try again later.

What is Error 403 in YouTube DATA API, All API calls seem to fail with "403 Forbidden" errors. YouTube Data API has not been used in project 1039996407057 before or it is disabled. the account used to generate the API key that Mageia's Minitube uses, not  forbidden (403) channelForbidden: The channel specified in the id parameter does not support the request or the request is not properly authorized. forbidden (403) promotedVideoNotAllowed: The channel that the API request is attempting to update cannot be found.

23199 – Minitube fails with "403 forbidden" errors for any operation, This search often fails because YouTube responds with a 403 error message. YouTube Data API has not been used in project 28589479198 before or it is disabled. your <a href=“/youtube/v3/getting-started#quota”>quota</a>. If you have more than one App server, toggle the Mashup - YouTube  What is a 403 Forbidden Error? The 403 Forbidden Error happens when the web page (or other resource) that you’re trying to open in your web browser is a resource that you’re not allowed to access.  It’s called a 403 error because that’s the HTTP status code that the web server uses to describe that kind of error.

Comments
  • Verify you've enabled the YouTube Data API v3 service for this key in your Google Developers console.
  • This answer was not helpful. We have gone through all the correct steps for generating an api key as outlined in the documentation.