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.
99,854
questions
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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 ...
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/...
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][...
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 ...
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 ...
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 ...
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 ...
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 ...
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) ...
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.
...
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 = ......
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 ...
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 ...
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 {
...
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 ...
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://...
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 ...
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 ...
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 ...
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, ...
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. ...
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 --> ...
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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). ...
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 ...
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 ...
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 ...
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?
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 ...
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.)
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 ...
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<...
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?
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 - ...