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
- How do I get a YouTube video thumbnail from the YouTube API?
- YouTube Autoplay not working
- ‘NoneType’ object has no attribute ‘group’
- Youtube api – stop video
- 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
- Use [embed] filter in template files
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Implementing “Video of the Day” Feature?
- add_filter to youtube embeds?
- Preventing YouTube embeds loading multiple instances of player JS?
- 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?
- Any way to use a custom Parameter for youtube embed without using an iframe?
- Youtube parameters within WordPress embed code?
- WordPress 5.3.x YouTube oEmbed is not working
- Cannot embed YouTube video
- How can i add all videos from youtube playlist as post?
- 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
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- 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
- 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?
- How to auto embedded youtube with wp_insert_post()
- How to change the way wp_embed handles only youtube videos?
- 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?
- Div around YouTube video
- Use Click Image to Play Youtube Video in a WordPress Loop
- Embedding Youtube video on comments
- Custom youtube shortcode that uses $content
- How to allow YouTube object embed in WordPress 3+?
- videos not showing on my tag pages
- 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
- Add parameter to first post only
- Get YouTube video id from url in a custom field
- Looking to Customize YouTube Video Embeds
- Limit iframe output in comment-meta commentmetadata
- Static image for embedded YouTube video instead of blank player?
- Adding YouTube button to TinyMCE editor
- add youtube thumbnail in index and single.php add video
- Publishing a video from blog to youtube
- Right align a youtube video
- Advanced Custom Fields oEmbed video width and height
- Youtube iframe embed keeps disappearing from page
- 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
- Add video tag to youtube link fron content
- Filter for wp_embed_handler_youtube not working
- change output location of plugin function using a custom hook
- Choopy Video Playback in a popup using Artiss Youtube Embed [closed]
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Facebook Share button wont recognize embedded video [closed]
- Fetching Video From YouTube Automatically [closed]
- Pull latest Youtube Video from json url and make new post
- Avoid embedding YouTube videos and open them in a new window