Menu
  • HOME
  • TAGS

What is the best practice for sending password from frontend to API server?

javascript,ruby-on-rails,api,rest,authentication

As long as you're using HTTPS then their password cannot be intercepted. Well.... it probably won't be intercepted. But the tactics that they would have to use in order to capture that password are somewhat out of your control. The user will have to be sure that they are actually...

Youtube api v3 duration

javascript,jquery,json,api,youtube

https://www.googleapis.com/youtube/v3/playlistItems only responses contentDetails with videoId, so you cannot retrieve the duration attribute. In your example, check again with this json...

HttpResponseMessage.Content as an attachment for an email

asp.net-mvc,api,httpresponse,email-attachments

Well, apparently there is a solution for my problem. What I had to do was to get the HttpContent from the API's HttpResponseMessage as Stream. After that, all the process was a piece of cake. Here is the solution. It works great. HttpResponseMessage response = _service.GetAPIResponse(...); Stream data = response.Content.ReadAsStreamAsync().Result;...

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...

Basic Auth to Receive Token in Spring Security

api,rest,spring-security,jwt

Here's a working sample code from Spring Security OAuth github. https://github.com/spring-projects/spring-security-oauth/tree/master/tests/annotation/jwt You probably don't even need to mess with the filters as shown in the above example. If you've custom needs, please post some sample code....

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...

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/...

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...

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...

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....

Sending messages from the application to twitter in certain conditions

ios,objective-c,api,twitter

You can monitor battery level like so: UIDevice *device = [UIDevice currentDevice]; device.batteryMonitoringEnabled = YES; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(batteryChanged:) name:@"UIDeviceBatteryLevelDidChangeNotification" object:device]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(batteryChanged:) name:@"UIDeviceBatteryStateDidChangeNotification" object:device]; // Your notification handler - (void)batteryChanged:(NSNotification *)notification { UIDevice...

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

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...

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,...

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...

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...

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...

Using Python's Requests library, cannot get API call to properly format

python,json,api,rest,python-requests

Argh. That is a horribly designed API. The problem, as you noticed, is that they want parameters separated by semicolons. That means they are not part of the querystring at all, which is what requests does when you give it a params dict, but part of the actual URL path....

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...

Getting a php array

php,api,curl

The API seems to return a JSON encoded string. So instead of: parse_str(curl_exec($ch), $parsed); use: $parsed = json_decode(curl_exec($ch), true); Then a print_r($parsed) will output: Array ( [success] => 1 [uses] => 154 ... ) And for checking success value: if ($parsed['success']) { // Do stuff } ...

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...

How to Get Data From Qualtrics

javascript,ajax,api,qualtrics

Qualtrics provides a REST API: http://www.qualtrics.com/university/researchsuite/developer-tools/api-integration/qualtrics-rest-api/ You would use the API command getLegacyResponseData to get response data. You can use AJAX to call the API....

Responding to an Office 365 event invite via REST

ios,objective-c,api,rest,office365

The meeting invitation will show up as a Message in the user's inbox. You would use the Mail API to access this. For the most part it looks like a normal email, but it has a few extra properties. "MeetingMessageType": "MeetingRequest", "[email protected]": "https://outlook.office365.com/api/v1.0/Users('[email protected]')/Events('AAMkADRm...')" By using the value of the [email protected]

Android rgb color api [duplicate]

android,api

You can use the Color class which is an default android class. int rgb = Color.rgb(red, blue, green) it has static method rgb() which takes the red, blue and green colors and returns the mixed color....

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...

Filtering / subrequest to get results

python,api,eve

Did you try to write the url like this: http://127.0.0.1:5000/api/v1/entity?where=section=='section32' please have a look at this python-eve.org/features.html#filtering...

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...

Swift ios alamofire data returning empty first time in viewDidLoad

ios,swift,api,model-view-controller,alamofire

Your loadAdInfo method is asynchronous. In the same way you're using a completionHandler to get Alamofire's data from adsForSection to loadInfo, you need to make an handler for loadInfo so you can retrieve the asynchronous response. Something like this: func loadAdInfo(section: String, page: Int, handler: (JSON) -> ()) { NWService.adsForSection(section,...

Rails 4 best practice for API

json,api,ruby-on-rails-4

Not sure if I understood your explanation. Here is my 2cents. I prefer to have separate controllers for API and he Web App. For couple of reasons: when you start to releasing the new versions you don't want to change the web app controller also you don't want to have...

Deployment of Python API

django,api,nginx,deployment,uwsgi

Security, what this is ultimately about, is and always has been a very complicated matter. The open internet is one of the most dangerous places. No matter how small and insignificant your server seems to be, people will find it and try to break it. If a web server is...

particular single product's price, title and other detail fetch using flipkart api

php,mysql,json,api,base64

//Include the class. include "clusterdev.flipkart-api.php"; //Replace and with the correct values $flipkart = new \clusterdev\Flipkart("pratikson3", "853d3bc027514b3aa33f1caa4f30f1cf", "json"); $pid = "Flipkart Product ID"; $url = 'https://affiliate-api.flipkart.net/affiliate/product/json?id=' .$pid; //Call the API using the URL. $details = $flipkart->call_url($url); if(!$details){ echo 'Error: Could not retrieve products list.'; exit(); } //The response is expected...

Delay between api calls Nodejs

javascript,node.js,api,express

The problem with for loops, or any loops is, that they are usually fast. In fact, it takes about several microseconds to loop over the list. This means that within a range of a few microseconds, you schedule several anonymous functions to be called after 1.5 seconds. This means that...

XMLHttprequest not working the twitch.tv api

javascript,api,xmlhttprequest,twitch

The Twitch.tv API doesn't support CORS. You need to use JSON-P (aka JSONP) to work around it. Read more about that in the Twitch.tv API docs. There is a prior answer on how to make a JSONP request with native JavaScript that may be useful.

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....

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...

Could someone bring Google OAuth2 for Cloud DNS via Rest to light?

c#,api,rest,google-app-engine,dns

found some time to create a small sample application. You can find the code on github . You said you don't want to use the client_secrets.json. The only quick solution i found was to provide the necessary stuff via memory stream - there may be better ways. Most of the...

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)...

Why does grep give “Binary file (standard input) matches”?

c,file,api,io,pipe

You are attempting to write 36 bytes instead of 6, effectively accessing bytes beyond the end of the string. Definitely undefined behaviour. Only the first '\0' byte is expected. Use fwrite("Hello\n", 1, 6, cmd); Or more simply: fputs("Hello\n", cmd); ...

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...

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....

Convert youtube video to mp3 using Quick MP3 API

php,api,youtube,mp3

try this code : don't forgot to include quick_func.php in your php code require_once('./quick_func.php'); // quick mp3 functions $url = "http://www.youtube.com/watch?v=qpgTC9MDx1o"; $exp = explode("?v=",$url); $vid = $exp[1]; $data = Convert_Vid($vid); // video id to convert $id = $data['id']; // get video id $title = $data['ttl']; // get video title $duration...

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...

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....

Idempotent PUT in a concurrent environment

api,rest,http,idempotent

Idempotency means that in an isolated environment multiple requests from a same client does not have any effect on the state of resource. If request from another client changes the state of the resource, than it does not break the idempotency principle. Although, if you really want to ensure that...

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...

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; ...

Error message in XML and API with C# Code

c#,xml,api,visual-studio-2013

You're actually getting a json, change the following: client.Headers.Add("Accept", " text/html, application/xhtml+xml, */*"); to client.Headers.Add("Accept", "application/xml"); ...

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...

Difficulty accessing Docker's API

linux,api,docker,firewall

I figured it must be a firewall problem but it took a while longer before I realised it was the firewall built into Linux. To make 2375 accessable: Use one of the following depending on your distro sudo firewall-cmd --zone=public --add-port=2375/tcp --permanent sudo firewall-cmd --reload OR sudo iptables -I INPUT...

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....

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...

Dismiss Windows Phone alarm

api,windows-phone,alarm,dismiss

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

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...

PHP Json Decode code not working dailymotion

php,json,api

Try to put quotes on the array : foreach($json_a['list'] as $p) ...

Ambari Monitoring raw data

api,data,monitoring,ambari

I don't clearly see why this got downvoted, but nevermind. I found the solution myself: The Ambari Metrics API can deliver the data in question, e.g. CPU load, memory usage, Network bandwith or load factors by sending a GET Request to http://&ltambari-server>:8080/api/v1/clusters/&ltcluster-name>?fields=metrics/&ltmetric>[&ltstart>,&ltend>,&ltstep>] while the metric can be network, cpu, cpus,...

Web API returning null JSON objects C#

json,api,web,large-data-volumes

Either mReader.GetString(i) is returning null or you have no data in the columns.

GoogleCloudMessaging - InstanceID.getInstance(), registering from client

java,android,api,cloud,messaging

There's a working example at https://developers.google.com/cloud-messaging/android/start git clone https://github.com/googlesamples/google-services.git In there they do in RegistrationIntentService.java InstanceID instanceID = InstanceID.getInstance(this); String token = instanceID.getToken(getString(R.string.gcm_defaultSenderId), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null); gcm_defaultSenderId is your project id (79424738XXXX) this is the RegistrationIntentService.this ...

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...

Office 365 Rest API Access to public folders

api,office365,outlook-restapi

The REST API doesn't support public folder access. EWS would be the way to go if you need PF access.

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...

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...

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...

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.

Profile/account REST API naming convention

php,web-services,api,rest,http

Your resource URIs should be more or less constant, and the HTTP verb determines what action is performed, eg: /api/orders: GET: list orders POST: create new order /api/orders/{order-id}; GET: retrieve info about an order POST: create an order with the specified ID PUT: modify an order DELETE: remove an order...

shuting down an OS without using API's

c,api,operating-system,shutdown

Your low level code to shut down the hardware is going to depend on the architecture. For shutting down an i386 device with a BIOS, INT 15h is the vector that is eventually used by OS monitors. You should consider APM and ACPI schemes for power management, graceful shutdown of...

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,...

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?...

linkedin company search API multiple facets?

python,api,linkedin

the last one is correct, you just need to use facet not facets in the page you specified "https://developer-programs.linkedin.com/documents/company-search" facets is the output you get from the request while facet is the input....

How to know if Linkedin user is admin of his company on LinkedIn?

api,linkedin,linkedin-api

There is an API call that you can make that tells you this, documented on LinkedIn's developer website at: https://developer.linkedin.com/docs/company-pages#is_admin Additionally, you can get a list of all companies that the member is an administrator of with this call: https://developer.linkedin.com/docs/company-pages#list_companies...

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>...

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...

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....

Creating a Ruby API

ruby,api,sinatra

I think they want you to create a third-party library. Imagine you are schizophrenic for a while. Joe wants to build a Sinatra application to list some YouTube videos, but he is lazy and he does not want to do the dirty work, he just wants to drop something in,...

Jax-RS overloading methods/paths order of execution

regex,api,rest,jax-rs

This is in the spec in "Matching Requests to Resource Methods" Sort E using (1) the number of literal characters in each member as the primary key (descending order), (2) the number of capturing groups as a secondary key (descending order), (3) the number of capturing groups with non-default regular...

Authenticating mobile app login using webservice using oauth connection

php,android,api,authentication,oauth

Yes, you are on the right track to some extent but let me suggest a way which is used in the industry for a while now. 1st read question and answer to get the basic idea of how it should be done. How to implement 'Token Based Authentication' securely for...

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...

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....

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...

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...

Retrieve Data from API using C#

c#,xml,api

XDocument xml = XDocument.Parse(new WebClient().DownloadString("http://sporing.bring.no/sporing.xml?q=TESTPACKAGE-AT-PICKUPPOINT")); This will probably solve your problem. ...

CURL to POSTMAN

api,curl,http-headers,postman

The default Content-Type in cURL is application/x-www-form-urlencoded. In Postman, you can just select the x-www-form-urlencoded button and start typing in your key value pairs, i.e. Key Value answers[][question_id] 1 For --header, there's a Headers button at the top right. When you click it, you will see fields to type in...

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...

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...

Syntax Code to Retrieve Data from API to Class do not working properly

c#,xml,api,visual-studio-2013

Your code xml.Root.Descendants("platsannons").ToList()... gives an empty list. "platsannons" is the name of the root element you already have. Your code tries to find descendants with this name - and has to fail. It works if you replace it with xml.Root.Descendants().ToList()... ...

C# code to retrieve xml data

c#,xml,api,visual-studio-2013

You need to send HTTP headers: using (WebClient client = new WebClient()) { client.Headers.Add("Accept-Language", " en-US"); client.Headers.Add("Accept", "application/xml"); client.Headers.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"); XDocument xml = XDocument.Parse(client.DownloadString("http://api.arbetsformedlingen.se/af/v0/platsannonser/matchning?lanid=1&kommunid=180&yrkesid=2419&1&antalrader=10000")); } ...

How to real-time monitor the emails?

api,google-apps-script,gmail,quota

The Gmail API recently added push notifications via the google cloud pub/sub service. I wrote an example script on how to do this is Google Apps Script. You can view the code at: https://github.com/Spencer-Easton/Apps-Script-Gmail-Push-Notifications...

“\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...

Are the Facebook API Key and App Secret the same thing?

wordpress,facebook,api,facebook-graph-api,facebook-apps

The API Key is the API ID. The API secret is the API secret. That theme is using legacy terminology....

LinkedIn Group API changes

api,rest,group,linkedin

There is no way to access that API publicly any longer. You would need to apply to be part of their partner program to get access to those endpoints once again: https://developer.linkedin.com/partner-programs/apply...

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...

AngularJS resource query is misinterpreting object composed by arrays

php,angularjs,api,angular-resource

There is no particular standard for how arrays should be serialized into query strings. Different back ends expect different formats. This current method (in 1.1.x) was chosen specifically because it allows the developer the most flexibility. You can get your desired serialization by giving setting params to: params = {...

How to follow DRY principles in different namespaces Rails 4.2?

ruby-on-rails,api,ruby-on-rails-4,namespaces

There are a couple ways I can think of doing it: (NOT RECOMMENDED) - Send the urls to the same controller in your routes.rb file. Shared namespace that your controllers inherit from For example you could have: # controllers/shared/users_controller.rb class Shared::UsersController < ApplicationController def index @users = User.all end end...

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") ) { ... }...

Authentication request returned unexpected result: 404

c#,asp.net,.net,api

Check my own solution Steps: Go to https://console.developers.google.com/project and create project. Select project, select APIs & auth from top left corner menu. Select Credentials Create OAuth with button Create new Client ID (Application type - Installed Aplication. Fill field Product Name Save After that you got Client ID for native...