Menu
  • HOME
  • TAGS

Google Webmaster API - Mark crawlerros as fixed

Tag: api,http-status-code-403,google-webmaster-tools,google-crawlers

While marking the crawl-errors as fixed via the API, I got an 403 error „Insufficient Permission“. If I only read the erros via the api, I got no errors. I’m the owner of the site and I logged with my google webmaster credentials. I've created the API creditals with the developer console and I'm using OAuth. Is there any configuration that disallow writing via the API?

I've found this similar question on StackOverflow: Google Analytics reports API - Insufficient Permission 403 I cant find the View-ID

Best How To :

I've found the solution. Just set the Scope to WebmastersService.Scope.Webmasters instead of WebmastersService.Scope.WebmastersReadonly

string[] scopes = { WebmastersService.Scope.Webmasters };

            UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = "clientId", ClientSecret = "clientSecret" }
               , scopes
               , "My Name"
               , CancellationToken.None).Result;

Dismiss Windows Phone alarm

api,windows-phone,alarm,dismiss

Until today there is no API for dismiss alarm/reminder programatically.

Securing Symfony RESTful API consumed by angular front?

angularjs,api,symfony2,oauth,wsse

It all depends on what your requirements are. First of all, OAuth 2 is an authentication mechanism/spec which you can use in combination with sessions/bearer tokens/... This also applies for local accounts (since you want to do user registration). FOSAuthServerBundle is a bundle to implement the server-side of the OAuth2...

New workbook opened by external app cause macro to stop

excel,vba,api,excel-vba

Change your macro so it does not use ActiveWorkbook but instead uses either ThisWorkbook to refer to itself or Workbooks("book_name.xlsm") to refer to the workbook named as "book_name.xlsm". That way any cell or sheet references always refer to the correct workbook, regardless of what other books are open or which...

Google Webmaster API - Mark crawlerros as fixed

api,http-status-code-403,google-webmaster-tools,google-crawlers

I've found the solution. Just set the Scope to WebmastersService.Scope.Webmasters instead of WebmastersService.Scope.WebmastersReadonly string[] scopes = { WebmastersService.Scope.Webmasters }; UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = "clientId", ClientSecret = "clientSecret" } , scopes , "My Name" , CancellationToken.None).Result; ...

Verify youtube api v3 video exists JS

api,video,youtube,exists

You can use something like this to determine if a video exists: var url = "https://www.googleapis.com/youtube/v3/videos"; var videoId = "id={YOUR-VIDEO-ID}"; var apiKey = "key={YOUR-API-KEY}"; var part = "part=snippet"; $.get(url + "?" + apiKey + "&" + videoId + "&" + part, function(response) { alert(response.pageInfo.totalResults); }); response.pageInfo.totalResults will equal 0 if...

Hide referrer header in API request

javascript,api,google-api,cross-domain,referrer

Why your PHP script is failing: If you take a look at your error response from PHP: PHP Warning: file_get_contents(https://translate.google.com/translate_tts?ie=utf-8&q=the+brown+fox+jumped+over+the+lazy+dog) You'll notice that the url file_get_contents is requesting does not contain a tl parameter. This is causing a 404 to be returned. You can visit the page directly in your...

Link to another resource in a REST API: by its ID, or by its URL?

json,api,rest,api-design,hateoas

DO include absolute entity URIs in your responses (such as /customers/12 or even http://www.example.com/customers/12). DO NOT include just an entity's ID (such as 12) in a response, because that way you're forcing clients to put together resource URIs themselves. In order to do that, they would need to have prior...

Ruby API Call Page Issue

ruby-on-rails,ruby,json,api,httparty

In fact, a quick google led me to this page https://app.enigma.io/api#data which tells me the parameter in question is limit, and that the max is 500. So, it looks like you can't get the data for all rows in one hit. If you really NEED the data for all the...

Instagram API Comments Created using Python (ERROR: AttributeError)

python,api,python-2.7,instagram,instagram-api

Unfortunately, Instagram is not very consistent in their API. The creation time of a media object is called created_time, but for a comment it is created_at. Also note there's no need to request the comments separately: they are already available for each media object, in media.comments....

Ruby on Rails posting to an API using javascript via a proxy

javascript,ruby-on-rails,ruby,xml,api

Net::HTTP is Ruby's built in library for sending HTTP requests. Rails also has built in features for serializing models to XML. Lets say you bind your form to a User model: class User < ActiveModel::Base # attr_accessor is not needed if these are real DB columns. attr_accessor :firstname attr_accessor :surname...

square connect api batch processing

api,batch-processing,square,square-connect

From the Square docs: Note the following when using the Submit Batch endpoint: You cannot include more than 30 requests in a single batch. Recursive requests to the Submit Batch endpoint are not allowed (i.e., none of the requests included in a batch can itself be a request to this...

Blockchain receive API with same address

api,bitcoin,blockchain

I think I can help. Disclaimer that I work for BlockTrail. It would not be good to use the same address because people can view the historical transactions associated with that address. It is recommended to use a new address for every transaction. These can be under the same wallet...

Retrieving values from a php service in HTML

javascript,php,html,mysql,api

The easiest way to get those variables in Javascript is to output them from PHP to JS, there is no direct bridge, so you will need in the HTML output a script block with the values you got from your SQL query, it will be something like this: <script> var...

Is twitter streaming api exactly 1 percent of the whole streaming?

api,twitter,streaming,tweepy

Not exactly if they didn't change the way they sample from the time this blog post was written: http://blog.falcondai.com/2013/06/666-and-how-twitter-samples-tweets-in.html According to the article they send the tweets that where published between the 657th and the 666th millisecond. So it's not exactly 1% but a good approximation....

PayPal Developer Account & API ..what happens if account is limited?

api,paypal

There are multiple types of account limitations. For most limitations you can continue to accept payments. In other cases not. If PayPal is uncertain about whether an account may have been compromised, or lacks a required piece of paperwork, they will generally only limit withdrawals so that the merchant can...

Reverse GeoCoordinate Class gives Location Not found error

android,api,google-maps,google-maps-api-3,reverse-geocoding

Make sure you have latest Google play library in your project. I am using this code and working for me. private class ReverseGeocodingTask extends AsyncTask<LatLng, Void, String> { Context mContext; public ReverseGeocodingTask(Context context) { super(); mContext = context; } // Finding address using reverse geocoding @Override protected String doInBackground(LatLng... params)...

Removing Alert When Using DeleteFile API

vb.net,vba,api,delete

There are several SHFILEOPSTRUCT.fFlags options you'll want to consider. You are asking for FOF_NOCONFIRMATION, &H10. You probably want some more, like FOF_ALLOWUNDO, FOF_SILENT, FOF_NOERRORUI, it isn't clear from the question. Check the docs.

REST api : correctly ask for an action

api,rest,endpoint

Try to separate API from your application logic. From API you GET the quote and API from now on shouldn't care what you do with that data. The same with marking quotes as favorites. It's your application's and user db's problem how to mark something. Again, API should care only...

how to put a location name programmatically in Google JS autocomplete API and get the results?

javascript,api,autocomplete

I tried something, as I mentioned in the comments I pass the value through an API that searches for city details. Look at function getUkCountry(). That function tries out the four regions/countries of the UK. It works for the case you mentioned, it works for Westminster. I'm not really happy...

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)

python,api,utf-8

I think what you are looking for is: # ... text = articleFile.read().decode('utf-8') keyphrases = extractKeyphrases(text) # ... Basicly you want to decode to an unicode string the contents of the file as soon as you read it. Then the rest of your program is save from conversion problems. Please...

IOS Use Core Data Only in Specific Parts of an app

ios,api,core-data

Initialize it without a context: NSEntityDescription *entity = [NSEntityDescription entityForName:@"MyEntity" inManagedObjectContext:myMOC]; NSManagedObject *unassociatedObject = [[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:nil]; Source: How to Deal with Temporary NSManagedObject instances?...

REST API with token based authentication

angularjs,codeigniter,api,rest,token

You can use an API key, however - as you wrote - it's pure protection and easily accessible value - potential abuser just needs to view the source or investigate the queries. In general REST APIs are secured with tokens. At the beginning of the session (not in traditional meaning...

GitHub API returned Url meaning

git,api,url,github,github-api

Those are placeholders value, that you would need to replace by an actual value in order to use those links. It serves to remind a user how to access, for instance, the following_url for another user. without {/other_user}, that url https://api.github.com/users/zhuhuihuihui/following would list all users followed. with {/other_user}, that url...

Use higher API level in android with an external library

java,android,api,android-studio,material-design

You can use limited features from material design in pre-lollipop versions. No Path Animations and such. Check out this link to see which features can be backported. http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html Although now it is appcompat-v22 which is the latest SDK released by Google....

CORS, Client vs. Server & Rails API GET Request

ruby-on-rails,ruby,api,curl,client

The IP of the client can change frequently and will only show the IP of their ISP, so limiting an API that may get called from the browser by IP might not be a good idea. CORS is related to resources (javascript, fonts, etc.) loaded by the browser over different...

Give port number and passed parameters in WSO2

java,api,wso2,wso2-am,api-manager

The Test button will send HTTP OPTION request to the endpoint, and if the endpoint supports HTTP OPTION request, then it is shown as valid. As far as your backend point support the HTTP method you need, you don't need to worry about this Test button against the endpoint....

Apache Nutch REST api

api,rest,web-crawler,nutch

At the time of this posting, the REST API is not yet complete. A much more detailed document exists, though it's still not comprehensive. It is linked to in the following email from the user mailing list (which you might want to consider joining): http://www.mail-archive.com/user%40nutch.apache.org/msg13652.html But to answer your question...

API Integration

xml,api,curl

Your xml formation needs to be: $xml = '<xmlrequest> <username>admin</username> <usertoken>79fc84383811o000fggYYgsui41e5eb</usertoken> <requesttype>subscribers</requesttype> <requestmethod>AddSubscriberToList</requestmethod> <details> <emailaddress>'.$email. '</emailaddress> <mailinglist>10</mailinglist> <format>html</format> <confirmed>yes</confirmed> <customfields> <item>...

How to hide API keys in GitHub for iOS (SWIFT) projects?

ios,swift,api,parsing,apple-watch

You can use a .plist file where you store all your important keys. It is very important to put this file into your .gitignore file. In your case, you need to set your keys.plist file like this: And use it inside your AppDelegate as follows: var keys: NSDictionary? if let...

PHPUnit: Testing RestFul API with die response

php,json,api,zend-framework2,phpunit

I would strongly suggest trying to find the solution in rewriting your the code that returns your JSON string inside your controller. Using die to return a response object is not the way to go. An example on how to return JSON from your controller action could be as simple...

Angular JS Sending Array data with $resource to .NET API

.net,angularjs,api,angular-resource

You can modify data using transformRequest ResourceModule.service('PartProgramsResource', function ($resource) { var url = _baseUrl + '/parts/:partId/programs' return $resource(url, { partId: '@partId' }, { add: { method: 'POST', transformRequest: function (data, headersGetter) { //modify data and return it return angular.toJson(data); }, isArray: true } }); }) Am not 100% sure why...

REST API design for cloning a resource

api,rest,post,yaml,webdav

Influenced by project requirements and the range of preferences amongst members in my team, option 1 will serve us best at this stage. Conforming to the standard HTTP methods will simplify and clarify my API There will be a single, consistent approach to cloning a resource. This outweighs the issue...

xmlrpclib error 'module not found' when trying to access gandi api

python,api,python-3.x,xml-rpc

I am not sure if you did give out your real API key, but I urge you to change it ASAP. In any case, in Python, top level variables/names do not come from thin air - they're introduced either by import or the assignment statement (x = 123), (or some...

“\x90” from ASCII-8BIT to UTF-8 error rails

ruby-on-rails,ruby,api

So after hours trying to find out what the problem is, I have figured this out. The problem was the part where I tried to encode my hash to JSON. Apparently Rails or my application do not understand the .to_json method, so I had to use the JSON.generate(data) serialization as...

Is there any way to find out when an album got added to spotify with the web api?

javascript,api,web,timestamp,spotify

After getting an answer from spotify is seems it's currently not possible to get this information. "At the moment we are only exposing the release date of the album itself, not the date of addition to the Spotify index. We will take this into account as a feature request." https://developer.spotify.com/web-api/get-artists-albums/...

Unique Entity Error message

api,symfony2,exception-handling,doctrine

The Symfony validator service can be used directly to validate any object for which validation constraints are defined. For example in a controller: $validator = $this->get('validator'); $errors = $validator->validate($test); To perform validation within a service you can pass the validator service into your service....

How to save Facebook private message to database? [on hold]

php,facebook,api,permissions

There is no permission called "read_inbox", and if you mean "read_mailbox", you may want to read this: This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition,...

REST-API Different Content-Type on Error Response

java,json,api,rest,spring-mvc

User should always specify what content it's expecting with Accept header. It's you job to return the error that was thrown/caught on the server side in the format that was specified in Accept header. In spring as far as I know it could be achieved with a special mapper. Below...

Using Graph API Explorer gets friends list but my own app doesn't . (Graph API Explorer token v.s App Token)

facebook,api,facebook-graph-api

The friends you see in the response have used the Graph API Explorer as well. In order for a person to show up in one person's friend list, both people must have decided to share their list of friends with your app and not disabled that permission during login. Also...

Inbox api use them to tag relevant mails just like inboxsdk.com

python,api,google-inbox

I am not quite sure where exactly you are struck , but please refer to the following document https://www.inboxsdk.com/docs/#ComposeView though it is documented in javascript

How to get each track of a playlist with the Soundcloud API?

javascript,api,stream,soundcloud

Soundcloud's developer docs state that each playlist contains an array of tracks (see https://developers.soundcloud.com/docs/api/reference#playlists). You should be able to loop through the array and populate the html with the relevant values by effectively joining the code in your question together, though you will want to either use classes in the...

How to make the Twitter API returns me over 800 tweets

api,twitter,timeline,tweets,home

You can not get more then 800 tweets in 1 go. But you can pass parameters like since_id and max_id: https://dev.twitter.com/rest/reference/get/statuses/home_timeline If you store the oldest tweet id => and in the next api call you pass in that id, then you will get the older ones. After that you...

How to POST - API in thingspeak.comusing urllib in Python

python,api,post,urllib

You are sending the query parameter named field1 in the URL, but it is set to any empty string. Hence field1 is set to "" by thingspeak.com. Those values you pass in params are sent in the body of the HTTP POST request, they are not somehow appended to the...

Stuck with nested serializer using Django Rest Framework and default user

django,api,rest,django-rest-framework,serializer

By default DRF will look at an attribute on the User model named after the serializer's field (member here). However the related name is profile. This can be worked around by passing the source="profile" to your MemberProfileSerializer....

Retrieve access token for Yahoo API using OAuth 2.0 and Python requests

python,api,oauth,python-requests,yahoo-api

Change your body variable to a dict, i.e., body = { 'grant_type': 'authorization_code', 'redirect_uri': 'oob', 'code': '************', } No other changes are needed. Hope it helps....

Return value -Java API design VS. C API

java,api

One major difference is that Java had exceptions, and exception handling, from the start. That means there is no need to return "SUCCESS". If it returns at all, rather than throwing an exception, it was successful. Java does not have pass-by-reference. What it does have is pointers. When you call...

Spotify Web API - Client Credentials - Accessing a users playlists

php,api,oauth,spotify

First question, is it possible to get a users playlist tracks using client credentials flow? Yes, retrieving tracks for a playlist doesn't require user authentication as part of the access token. I've also tried creating the API variable using $api = new SpotifyWebAPI\SpotifyWebAPI(); but this says I need user...

How to compare voice command input by user to hard coded strings

java,android,api,voice

You are comparing your String to a TextView object instead of directly to the data. Try if( result.get(0).equals("weather") ) { ... } Or at least if( txtSpeechInput.getText().toString().equals("weather") ) { ... }...

Django update without required fields

django,api,rest,django-rest-framework

UPDATE is possible via 2 requests: PUT and PATCH PUT updates all the fields of the object on which the operation is to be performed. It basically iterates over all the fields and updates them one by one. Thus, if a required field is not found in the supplied data,...