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
- How do I get a YouTube video thumbnail from the YouTube API?
- How do I get a YouTube video thumbnail from the YouTube API?
- Youtube_dl : ERROR : YouTube said: Unable to extract video data
- Failed to execute ‘postMessage’ on ‘DOMWindow’: https://www.youtube.com !== http://localhost:9000
- How to embed an autoplaying YouTube video in an iframe?
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- How do I embed youtube videos with https instead of http in the URL?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- Modify youtube video size on one page and show another size on different page
- 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
- 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?
- Convert all youtube link to embed
- Get all Youtube video’s from posts and embed them on a different page
- WordPress 5.3.x YouTube oEmbed is not working
- Why isn’t this youtube shortcode working?
- Creating bulk posts with Youtube videos
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- How to import my YouTube channel into WordPress?
- 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
- 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
- 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″]?
- How to make an embeded a Youtube video from custom field text responsive to screen size?
- Embedding Youtube video on comments
- Custom youtube shortcode that uses $content
- How to allow YouTube object embed in WordPress 3+?
- Modify YouTube Embed Code to fit theme
- How to edit embed filter for youtube video to allow responsive full width layout
- I’m having a problem viewing the Youtube video
- YouTube embeded video will not resize (only full screen responsive) [closed]
- iframe with Youtube video appears for logged-in users, but not for incognito users
- Looking to Customize YouTube Video Embeds
- Static image for embedded YouTube video instead of blank player?
- WordPress fails to embed video URL
- How To Use YouTube Url Stored In Custom Field To Get Video Image and Set it As Featured Image
- add youtube thumbnail in index and single.php add video
- Publishing a video from blog to youtube
- Rename Smart YouTube’s httpv back to http for all posts
- Is there a way to find all posts with Youtube video embedded?
- Thumbnail image doesn’t show up in Shortcode output
- Can’t embed certain youtube videos into theme
- Block editor: Sandbox iframe shows outdated HTML
- How to modify the HTML output of Gutenberg block? (Youtube)
- Advanced Custom Fields oEmbed video width and height
- Get youtube link title in post title
- Extract links inside embed tags in WordPress
- Post editor doesn’t save embed media [closed]
- Custom YouTube Plugin loading different PHP library on live site and localhost
- jQuery plugin is loaded correctly, but does nothing
- Order Posts By Youtube Views
- Widget to embed youtube video
- Filter for wp_embed_handler_youtube not working
- How to load post_meta for custom post type via Ajax
- change output location of plugin function using a custom hook
- plugin to upload to youtube via wordpress [closed]
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- feed url problem
- Pull latest Youtube Video from json url and make new post
- Avoid embedding YouTube videos and open them in a new window
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed