I'm using this method to Google Shorten a Long URL via PHP on server side.
But it return me this error :
"domain": "usageLimits", "reason": "ipRefererBlocked", "message": "The referrer null does not match does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions."
But I already set the Referrer to localhost & 127.0.0.1
I also enabled google shortener and check its quota
May I know what settings else I didn't configure or Google Shortener not working on http://localhost?
Related
I have generated a consumer key and consumer secret. The website has SSL installed. I have also installed plugins required for JSON and REST services. This is how the url looks like:
https://<url>/wp-json/wc/v1/products
If you want to test
Consumer Key: ck_8add1dc9101f8793a731d6b9aeaadd319fbedf37
Consumer secret: cs_18980264faa482536874e4544dfce9c090c7e927
When I am trying to get(GET) the product details using Basic Auth by using POSTMAN, a Chrome plugin, I get a JSON response like:
{
"code": "woocommerce_rest_cannot_view",
"message": "Sorry, you cannot list resources.",
"data": {
"status": 401
}
}
I have both the READ and WRITE permissions corresponding to the Consumer key.
I'm testing this RestApi on PostMan RestClient and i disabled SSL certificate verification on this app settings
The API credentials do not have permissions to read data from woocommerce. Please update the permissions from the woo API settings page and make sure the credentials have Read/Write access or at least Read access.
I'm using this php wrapper, successfully getting a code from pinterest using the link generated according to the docs:
$loginurl = $pinterest->auth->getLoginUrl($callback_url, array('read_public'));
Then when I run this:
$token = $pinterest->auth->getOAuthToken($_GET['code']);
It works fine on my local server, but when I try to run it on our Dreamhost server, I get:
Pinterest error (code: 403) with message: Forbidden
I looked through the error documentation Pinterest supplies, but I can't find anything relating to 403 errors when retrieving oauth tokens.
The only two places I've seen mention of 403 errors when requesting oauth tokens from Pinterest's API have concluded that Pinterest is blocking the ips or the user agent string.
I've tried manually overriding the user agent string to no avail.
I've tried contacting Pinterest to find out if there is anything I'm missing and they directed me here.
Make sure the Dreamhost server is using an HTTPS URL e.g. is using TLS. That could be the reason why you get a 403.
I’ve a simple PHP component that fetches videos from a public playlist on YouTube. I’m using Google’s official PHP SDK and authenticated with a server key (as I only need to access public data, not data in a user context).
Throughout development and into staging, this component has worked fine. However, I’ve moved the application to the client’s production server (a GoDaddy hosting account) and the component’s suddenly stopped working, instead throwing the following error:
Google_Service_Exception in REST.php line 83:
Error calling GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=PLAYLIST_ID&userIp=SERVER_IP&key=DEVELOPER_KEY: (403) There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.
I don’t understand. The server’s IP address is white-listed in the Google API Console. I know it’s the correct IP address, as I’ve sent a HTTP POST request from the server to another PHP script and captured the REMOTE_ADDR server variable.
I’ve also tried specifying the IP address in the request itself. The full code:
$client = new Google_Client;
$client->setApplicationName($appName);
$client->setDeveloperKey($developerKey);
$service = new Google_Service_YouTube($client);
$service->playlistItems->listPlaylistItems('snippet', array(
'maxResults' => 50,
'playlistId' => $collectionId,
'userIp' => $serverIp,
));
So what’s going? Why is Google deciding it’s not playing ball with the production server?
We are migrating data from one server to server. The requests that come to older server is being redirected to the new Ip address using htaccess. The older domain is registered with facebook. In the new domain I am getting the facebook authentication error.
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191 }
is there any way to do using htaccess so that it will take the older registered domain name while accessing facebook api's?
It needs Facebook facepile plugin(http://developers.facebook.com/docs/reference/plugins/facepile). I tried but I am getting this error
(The Facebook Connect cross-domain receiver URL (http://static.ak.fbcdn.net/connect/xd_proxy.php#?=&cb=f223d517566e616&origin=http%3A%2F%2Fpromolife.com.au%2Ff3e13728ba8ec8&relation=parent.parent&transport=postmessage) must have the application's Connect URL (http://www.testsite.com.au/) as a prefix. You can configure the Connect URL in the Application Settings Editor.)
Why do I get this error?
Your connect URL must be the same as the URL you are running the script on & the callback URL. When I say the same I also mean EXACTLY the same in the sense of whether you are using http://yoursite or http://www.yoursite. Double check your app settings to make sure for no typo's in the connect URL also.