Questions tagged [api]

DO NOT USE. Use specific tags like [google-cloud-platform], [facebook], [amazon-web-services] instead or [api-design] where applicable. Questions asking to recommend or find an API are off-topic.

Filter by
Sorted by
Tagged with
346 votes
14 answers
1.1m views

REST API Best practices: Where to put parameters? [closed]

A REST API can have parameters in at least two ways: As part of the URL-path (i.e. /api/resource/parametervalue ) As a query argument (i.e. /api/resource?parameter=value ) What is the best ...
Kalle Gustafsson's user avatar
137 votes
9 answers
724k views

How do I get currency exchange rates via an API such as Google Finance? [closed]

Now, I did find the Google Finance API and started looking through that but I found a lot of info about portfolios, transactions, positions & other stuff I know nothing about. Am I looking at ...
Bogdan's user avatar
  • 5,408
127 votes
5 answers
322k views

Is there a Wikipedia API?

On my Wikipedia user page, I run a Wikipedia script that displays my statistics (number of pages edited, number of new pages, monthly activity, etc.). I'd like to put this information on my blog. ...
rbrayb's user avatar
  • 47.3k
125 votes
5 answers
153k views

Why can't a Flutter application connect to the Internet when installing "app-release.apk"? But it works normally in debug mode

In debug mode, everything looks good. I get answers and data lists from my API. But after creating app-release.apk and installing it on my phone, there isn't an Internet connection any more. Here is ...
bimasakti's user avatar
  • 1,479
117 votes
28 answers
18k views

GB English, or US English?

If you have an API, and you are a UK-based developer with a highly international audience, should your API be setColour() or setColor() (To take one word as a simple example.) UK-based engineers ...
izb's user avatar
  • 50.9k
115 votes
2 answers
45k views

API Keys vs HTTP Authentication vs OAuth in a RESTful API

I'm working on building a RESTful API for one of the applications I maintain. We're currently looking to build various things into it that require more controlled access and security. While ...
Shauna's user avatar
  • 9,545
114 votes
15 answers
121k views

Twitter API returns error 215, Bad Authentication Data

I am trying to call following Twitter's API to get a list of followers for a user. http://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=username And I am getting this error ...
Dip Dhingani's user avatar
  • 2,499
109 votes
12 answers
157k views

How to Logout of an Application Where I Used OAuth2 To Login With Google?

In my application, I implemented Google signout using jsapi. I used the url https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=xxxxxx to connect to Google and then https://www.googleapis.com/...
Vinesh EG's user avatar
  • 1,325
108 votes
5 answers
210k views

Has Facebook sharer.php changed to no longer accept detailed parameters?

We have been opening a sharing popup (via window.open) with the URL like https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][...
tdous's user avatar
  • 1,598
107 votes
9 answers
187k views

Catching exceptions from Guzzle

I'm trying to catch exceptions from a set of tests I'm running on an API I'm developing and I'm using Guzzle to consume the API methods. I've got the tests wrapped in a try/catch block but it is still ...
Eric's user avatar
  • 1,273
107 votes
7 answers
74k views

Scala framework for a Rest API Server? [closed]

We are thinking on moving our Rest API Server (it is inside the web service, on Symfony PHP) to Scala for several reasons: speed, no overhead, less CPU, less code, scalability, etc. I didn't know ...
fesja's user avatar
  • 3,313
105 votes
11 answers
173k views

How exactly to use Notification.Builder

I found that I am using a deprecated method for noficitations (notification.setLatestEventInfo()) It says to use Notification.Builder. How do I use it? When I try to create a new instance, it ...
Saariko's user avatar
  • 1,703
105 votes
2 answers
118k views

How to use API Routes in Laravel 5.3

In Laravel 5.3 API routes were moved into the api.php file. But how can I call a route in api.php file? I tried to create a route like this: Route::get('/test',function(){ return "ok"; }); I ...
user avatar
104 votes
11 answers
151k views

Stock ticker symbol lookup API [closed]

Is there any sort of API that just offers a simple symbol lookup service? i.e., input a company name and it will tell you the ticker symbol? I've tried just screen-scraping Google Finance, but after a ...
dancavallaro's user avatar
  • 13.2k
104 votes
5 answers
128k views

Securing Spring Boot API with API key and secret

I would like to secure the Spring Boot API so it is accessible only for the clients that has valid API key and secret. However, there is no authentication (standard login with username and password) ...
Vitalii Oleksiv's user avatar
103 votes
4 answers
47k views

API to automatically upload apk to Google Play? [closed]

Is there any API or tool that enables me to automatically upload an APK to Google Play? I want to automatically publish customized apps to my account without any manual steps or graphical interface. ...
Magnus's user avatar
  • 3,731
102 votes
10 answers
145k views

How do I return an image in fastAPI?

Using the python module fastAPI, I can't figure out how to return an image. In flask I would do something like this: @app.route("/vector_image", methods=["POST"]) def image_endpoint(): # img = ......
Hooked's user avatar
  • 86.4k
101 votes
2 answers
120k views

How to detect when a youtube video finishes playing?

I am working on a site that has a ton of embedded youtube videos, the client wants to show a popup whenever a video stops splaying. I looked at the youtube api and there seems to be a way to detect ...
user avatar
100 votes
3 answers
269k views

How can I use the WhatsApp API from Java or Python? [duplicate]

I am looking for WhatsApp API, preferably a Python or Java library. I've tried Yowsup, but could not get my number registered; I am based in India and I am not sure if that has got anything to do ...
rishi's user avatar
  • 2,516
99 votes
6 answers
100k views

Set timeout for HTTPClient get() request

This method submits a simple HTTP request and calls a success or error callback just fine: void _getSimpleReply( String command, callback, errorCallback ) async { try { ...
SteAp's user avatar
  • 11.9k
98 votes
5 answers
52k views

Java: bounded wildcards or bounded type parameter?

Recently, I read this article: http://download.oracle.com/javase/tutorial/extra/generics/wildcards.html My question is, instead of creating a method like this: public void drawAll(List<? extends ...
Tony Le's user avatar
  • 983
98 votes
10 answers
79k views

pinterest api documentation [closed]

Update Aug 2015: Pinterest provides it here now https://dev.pinterest.com/ Is there official or unofficial documentation on the v2 Pinterest API? Things I know: JSON api is in version 2. https://...
Dylan Valade's user avatar
  • 5,575
98 votes
6 answers
107k views

Best/Most Comprehensive API for Stocks/Financial Data [closed]

What is the most recommended free/public API for accessing financial market stats and stock quotes (preferrably real-time quotes)? I'm not too picky about how it's exposed (SOAP, REST, some ...
Wilco's user avatar
  • 33k
96 votes
2 answers
73k views

How to store data in S3 and allow user access in a secure way with rails API / iOS client?

I am new to writing Rails and APIs. I need some help with S3 storage solution. Here's my problem. I am writing an API for an iOS app where the users login with the Facebook API on iOS. The server ...
dineth's user avatar
  • 9,922
95 votes
14 answers
80k views

Auto Shutdown and Start Amazon EC2 Instance

Can I automatically start and terminate my Amazon instance using Amazon API? Can you please describe how this can be done? I ideally need to start the instance and stop the instance at specified time ...
Pasta's user avatar
  • 2,491
95 votes
3 answers
49k views

Most suitable python library for Github API v3 [closed]

I am looking for a python library for the Github APIv3 suitable for me. I found one library (python-github3) mentioned in the GH API docs. After playing around with it in ipython for an hour or two, ...
Christoph's user avatar
  • 5,562
95 votes
4 answers
27k views

Using secret api keys on travis-ci

I'd like to use travis-ci for one of my projects. The project is an API wrapper, so many of the tests rely on the use of secret API keys. To test locally, I just store them as environment variables. ...
user94154's user avatar
  • 16.4k
94 votes
7 answers
79k views

aws api gateway & lambda: multiple endpoint/functions vs single endpoint

I have an AWS api that proxies lamba functions. I currently use different endpoints with separate lambda functions: api.com/getData --> getData api.com/addData --> addData api.com/signUp --> ...
Chris's user avatar
  • 13.7k
93 votes
3 answers
110k views

Is setting Roles in JWT a best practice? [closed]

I am considering to use JWT. In the jwt.io example I am seeing the following information in the payload data: "admin": true Admin can be considered as a Role, hence my question. Is setting the role ...
ayorosmage's user avatar
  • 1,677
92 votes
6 answers
67k views

How to post in Google+ wall

I want to share some information in Google+ wall from my application. For that I go through the Google+ API. In that API they are mentioning how to get access token of a particular user, but they do ...
Karthi Ponnusamy's user avatar
89 votes
10 answers
141k views

Automated testing for REST Api [closed]

I would like to write an automated testing suite for a REST API. As we complete new services, we'd like to check to make sure all the previously created services are working as expected. Any ...
user avatar
87 votes
3 answers
41k views

Twitter api text field value is truncated

why text field value is truncated and how can i get complete value. As of now i am trying to get text field value like below do { if let responseObject = try NSJSONSerialization....
Sheshnath's user avatar
  • 3,333
86 votes
6 answers
61k views

Return the current user with Django Rest Framework

I am currently developing an API using Django. However, I would like to create a view that returns the current User with the following endpoint: /users/current/. To do so, I created a list view and ...
Maxime's user avatar
  • 1,816
84 votes
7 answers
80k views

How does a site like kayak.com aggregate content? [closed]

Greetings, I've been toying with an idea for a new project and was wondering if anyone has any idea on how a service like Kayak.com is able to aggregate data from so many sources so quickly and ...
Jeff's user avatar
  • 2,828
84 votes
8 answers
69k views

Getting my public IP via API [closed]

Is there a public API from some big company to get my public ip from within a program? I've found http://ip-address.domaintools.com/myip.xml, which is exactly what I want, but unfortunately it ...
Slava V's user avatar
  • 17.1k
84 votes
10 answers
85k views

Cheapest way to send SMS for number verification? [closed]

My application needs to verify phone numbers that are provided by the user. What is the absolute cheapest way to send an SMS to a phone? Which company/API should I go to? I'm not looking for a hack ...
erotsppa's user avatar
  • 14.7k
83 votes
8 answers
99k views

Timezone lookup from latitude longitude [closed]

Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone?
Matt Sheppard's user avatar
80 votes
2 answers
22k views

Is devise's token_authenticatable secure?

I'm building a simple api with Rails API, and want to make sure I'm on the right track here. I'm using devise to handle logins, and decided to go with Devise's token_authenticatable option, which ...
Jeff Escalante's user avatar
79 votes
6 answers
138k views

Best way to generate xml? [duplicate]

I'm creating an web api and need a good way to very quickly generate some well formatted xml. I cannot find any good way of doing this in python. Note: Some libraries look promising but either lack ...
Joshkunz's user avatar
  • 5,815
79 votes
2 answers
51k views

Should null values be included in JSON responses from a REST API? [closed]

I'm in the process of designing and developing a RESTful API. I'm taking a pragmatic, resource oriented approach to the API (resource oriented, uniform interface, addressability, but no real HATEOAS). ...
Dennis Laumen's user avatar
78 votes
1 answer
59k views

Java 7 new IO API - Paths.exists [duplicate]

Does anyone know what happened to the path.exists() API method in the latest Java 7 API? I cannot find the change in the change logs, and between b123 and b130, the method has been removed from the ...
Eugen's user avatar
  • 8,683
78 votes
3 answers
37k views

Storing authentication tokens on iOS - NSUserDefaults vs Keychain?

Which is the place I should be storing tokens for when the user logins in to a service? I'm not saving passwords (obviously where I'd use the Keychain) but just the token. A lot of places say just use ...
Doug Smith's user avatar
  • 29.9k
78 votes
5 answers
38k views

How does Google Maps secure their API Key? How to make something similar?

Currently Google requires you to create an API Key that is specific to the domain of where the map will be served from. How does Google enforce this? I want to do the same thing. I expose an API for ...
Vyrotek's user avatar
  • 5,421
77 votes
14 answers
53k views

Accessing main picture of wikipedia page by API

Is there any way I can access the thumbnail picture of any wikipedia page by using an API? I mean the image on the top right side in box. Is there any APIs for that?
insomiac's user avatar
  • 5,654
77 votes
12 answers
108k views

GUI frontend for cURL for testing an API [closed]

I'm (manually) testing a RESTful API that makes full use of GET/POST/PUT/DELETE methods. Rather than using cURL on the command line to quickly test different input options, it would be handy if there ...
AdamTheHutt's user avatar
  • 8,427
76 votes
15 answers
98k views

How to obtain longitude and latitude for a street address programmatically (and legally)

Supposedly, it is possible to get this from Google Maps or some such service. (US addresses only is not good enough.)
Ola Eldøy's user avatar
  • 5,848
75 votes
6 answers
76k views

Authentication, Authorization and Session Management in Traditional Web Apps and APIs

Correct me if I am wrong: In a traditional web application, the browser automatically appends session information into a request to the server, so the server can know who the request comes from. What ...
Jiew Meng's user avatar
  • 85.9k
75 votes
5 answers
89k views

Retrofit - @Body parameters cannot be used with form or multi-part encoding

I m trying to make a request in which I want to include a Header , a form-urlencoded field and a json body. My Retrofit interface is as follows @FormUrlEncoded @POST("/api/register") Observable<...
Chris's user avatar
  • 1,681
75 votes
4 answers
136k views

What does API level mean?

I am wondering what exactly API level means. I couldn't seem to find an answer by searching on Google. Could anyone please explain what the term API level means?
Cemre Mengü's user avatar
  • 18.4k
75 votes
1 answer
60k views

REST API Authorization & Authentication (web + mobile)

I've read about oAuth, Amazon REST API, HTTP Basic/Digest and so on but can't get it all into "single piece". This is probably the closest situation - Creating an API for mobile applications - ...
svenkapudija's user avatar
  • 5,168

1
2 3 4 5
1998