If you restrict the application (or API key) by HTTP referrers, then your remote HTTP request should include a valid HTTP_REFERER
header, which wp_remote_get()
does not set by default. And you can set the header using the headers
argument like so where the array key is referer
(note that it’s not double “r” as in “referrer”):
$response = wp_remote_get( esc_url_raw( $url ), array(
'headers' => [ 'referer' => home_url() ],
) );
Related Posts:
- YouTube: How to extract closed caption transcript from YouTube video?
- Is there a way to get all IP addresses of youtube to block it with Windows Firewall?
- YouTube maxresdefault thumbnails
- Youtube – downloading a playlist – youtube-dl
- URL syntax for Youtube video in fullscreen and start at time index
- How to customize an end time for a YouTube video?
- How add class youtube and type/html to oembed code?
- YouTube oEmbed and privacy-enhanced mode
- oEmbed youtube video aspect ratio
- Adding a wrapper to the youtube embed automatically?
- WordPress, oEmbed & YouTube video’s with a ‘dash’
- Link Youtube Channel In WordPress Site
- Embed youtube list with sidemenu opened
- Getting youtube links from post_content not working
- Add latest Youtube videos on main page [closed]
- How do I embed a YouTube video in WordPress 3.0?
- Echo do shortcode with custom field not working
- How to change src link in YouTube?
- How to make an image of a YouTube video appear as a thumbnail in the list of blog posts
- WordPress and Youtube problem
- Iframe Youtube video doesn’t work
- display only youtube video sticky post
- Generate a WP post from Youtube Feed
- Importing YouTube Videos As Posts – From Playlists
- Embbeded YouTube video not showing when admin logged in
- Embedding YouTube Videos at Time of Publish Instead of Time of Schedule (Bare URLS Make Me Sad)
- How do I get a YouTube video thumbnail from the YouTube API?
- YouTube Autoplay not working
- ‘NoneType’ object has no attribute ‘group’
- How do I get a YouTube video thumbnail from the YouTube API?
- Youtube api – stop video
- Youtube_dl : ERROR : YouTube said: Unable to extract video data
- How do I hide related videos at the end of a YouTube playlist embed code?
- Disable play/pause/full screen for HTML5
- Failed to execute ‘postMessage’ on ‘DOMWindow’: https://www.youtube.com !== http://localhost:9000
- How to embed a youtube playlist with a sidebar
- YouTube: How to present embed video with sound muted
- How to embed an autoplaying YouTube video in an iframe?
- How can I embed a YouTube video in a WordPress template page?
- Setting a post’s featured image from an embedded YouTube video
- Use [embed] filter in template files
- Do_Shortcode not working for Embed
- How do I embed youtube videos with https instead of http in the URL?
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Implementing “Video of the Day” Feature?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- Is it possible to enqueue the Youtube API script or does it have to be inline?
- Modify youtube video size on one page and show another size on different page
- add_filter to youtube embeds?
- Preventing YouTube embeds loading multiple instances of player JS?
- WordPress Editor not getting youtube video preview
- Being notified when some YouTube video in some post becomes unavailable
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to change thumbnail of embedded Youtube video?
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Youtube – Embed as IFRAME
- Any way to use a custom Parameter for youtube embed without using an iframe?
- How can i create a function to get youtube video time
- Is it possible to modify the default YouTube embed attributes string?
- How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
- How to link to YouTube videos with thumbnails?
- Add a YouTube or Vimeo video as a post attachment?
- Convert all youtube link to embed
- Get all Youtube video’s from posts and embed them on a different page
- Youtube parameters within WordPress embed code?
- WordPress 5.3.x YouTube oEmbed is not working
- Cannot embed YouTube video
- Embed YouTube video on category description
- How can i add all videos from youtube playlist as post?
- Why isn’t this youtube shortcode working?
- Use oEmbed in List Items
- vimeo/youtube video embed with thumbnails
- Embed YouTube video from custom field value
- Grab YouTube Thumbnail AFTER Post?
- Embeding YouTube video via a template function throws iframe cross-domain policy error
- Video Embed with Captions in Turkish
- Creating bulk posts with Youtube videos
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- How to import my YouTube channel into WordPress?
- WordPress site in China times out on requests to youtube [closed]
- Remove Title of youtube video
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- Iframes inside bootstrap tab disappear when tab is shown
- pass user id in slug and get user information
- Cannot embed YouTube videos “Failed to embed” error
- How to set YouTube video as featured image?
- How to save post change url youtube link?
- How can I grab the video id of youtube?
- YouTube Video autoplay
- How to auto embedded youtube with wp_insert_post()
- oEmbed not working in WordPress
- How to apply an ID to Shortcode Embedded iframe
- How to change the way wp_embed handles only youtube videos?
- Feed error: A feed could not be found at youtube.com/… (1 post) [closed]
- How to embed YouTube videos in posts without adding suggested videos at the end?
- WordPress block editor embeds not working in theme (single.php)
- WordPress keeps autoplaying my Youtube-Links no matter what I write
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- YouTube Sidebar Widget – YouTube service unavailable