Questions tagged [api]

96547 questions
1

votes
1

answer
29

Views

can't connect to method in the controller

I'm using asp.net web api. I'm trying to have a positive response from the server, however program is not seeing one of the methods in the controller. It goes into the controller constructor, but not further. The response is Status Code 404, Reason Phrase: Not Found. I understand that it can be a...
Alice
0

votes
0

answer
18

Views

Getting POST API to work with ajax using JavaScript

I'm trying to reach an API from inside my tag manager. The language to use for the so-called building blocks in this tag-manager is JavaScript. The POST API I am trying to use is fully functioning and works like this: input: {'features': 'xyz'} output: [0.45] I set up an ajax statement, but it does...
T.Beil
0

votes
0

answer
3

Views

using google storage and google vision API

I have the follow function that passes a image url to google vision service and returns the letters and numbers (characters) in the image. It works fine with general web urls but I'm calling it to access files stored in Google storage, it doesn't work. How can i get this to work? I've looked at ex...
resolver101
0

votes
0

answer
3

Views

Google Cloud API client - How to enable specific API programmatically?

I am trying to automate few steps for a google cloud project. I will be receiving project ID and service account credentials (json) as input to my program. I would like to enable few APIs like 'Cloud Machine Learning API' or 'Resource Management API' for this service account programmatically. [Co...
PST
0

votes
0

answer
2

Views

Trying to show a map using the Google Places API, but it is not displayed due to the following error: initMap is not a function

I am trying to load a map on my WordPress apage using the Google Places API. However, it does not display, which is probably due to the following error: 'initMap is not a function'. I found several related threats, but I couldn't find the right answer that applies to my specific case: jQuery(documen...
user3588669
1

votes
3

answer
137

Views

JSON to Python objects

I am deliberating about how to transfer the complex information from a JSON API response to (several) Python objects. I have included the (lengthy) model response below. Note that some values are not always included in the response, and some values are a list of dictionaries. Is there an 'easy' way...
Dave
1

votes
2

answer
2k

Views

Retrieving facebook user access token with socialite on laravel 5.4

I am trying to get user access token so I can send CURL request through Guzzle to Facebook's Graph API to get user's friends that are using the app. But I can't seem to be able to obtain it. Here's my controller:
Mihail Pernichev
1

votes
2

answer
161

Views

Dropbox API with Django - Authentication

I'm trying to learn Dropbox API and want to use OAuth 2 for authorization. I'm getting following error: dropbox_auth_start() missing 1 required positional argument: 'request' Here is my code: Views.py from dropbox import DropboxOAuth2Flow from django.shortcuts import redirect def get_dropbox_auth_fl...
Hannan
1

votes
1

answer
3.4k

Views

How to check if Google maps API key is integrated

Question:- Is there any way to check that whether google maps has been integrated with correct api key? Description:- I am using Google maps in my project which was not developed from scratch by me. The project has also used async loading of maps using requirejs as well. But I am not sure whether th...
Shivek Parmar
1

votes
2

answer
98

Views

Listening google events

Could you tell me, how can I listening google analytics (google tag manager) event with native javascript? For example: The client sent this event ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue]); I need to subscribe to this event.
Valera Checha
1

votes
2

answer
1.1k

Views

Load Testing AWS API Gateway

As the question suggests, I need to perform Load Test on the API Gateway Resources with 1 million RPS. Apache JMeter is a very good tool for Load Testing. But I think it won't be possible to simulate such a huge load from a single machine. In that case, JMeter Clusters could be useful. But setting i...
Tapas Bose
1

votes
1

answer
3.9k

Views

Implementing Google Calendar API with Angular 5

I'm trying to connect to the Google Calendar API using Angular 5 so that I can display upcoming events on the web application I am building. I'm new in Angular and i'm looking for a way to integrate the API in my app. I searched alot but i didn't find a way to do it.
Eve
1

votes
4

answer
87

Views

How to ouput desired data from a key in JSON if there are multiple keys

I want to output data of the lyrics_body key from the following URL.API Link But the JSON text on that URL is like that following. { 'message': { 'header': { 'status_code': 200, 'execute_time': 0.0047609806060791 }, 'body': { 'lyrics': { 'lyrics_id': 16894378, 'can_edit': 0, 'locked': 0, 'published_...
Nirzak
1

votes
1

answer
281

Views

Response for preflight has invalid HTTP status code 401 - Testing

so i'm using nodejs to access an API ( league of legend api ) from my server, i tested the route that access the api using httpie ( a simple http client) and everything is working without any issue. when i wanted to write tests for my api using Jest + supertest, and when i tested the route that acce...
karim
1

votes
2

answer
633

Views

RESTful API: Delete Entity - What should I return as result?

I am implementing a RESTful API and an endpoint of one controller is Delete. Delete does two actions depending of the entity to be removed: it updates the entity or it deletes the entity from the database. If delete updates the entity I would send the HttpStatus 200 and the updated entity. But if th...
user9923760
1

votes
1

answer
482

Views

toggling series of google chart on and off by clicking on legend

I have an area chart that has 6 series. I want the user to be able to click on the legend to toggle the visibility of a series. I found this example & have tried including it in my code below but nothing happens. Before adding this code if I clicked on one of the series in the legend the series woul...
mHelpMe
-3

votes
1

answer
20

Views

Is there a way to get date of the object attached in the picture?

I am not able to console a property time in the attached image it gives error ; link of the image . https://imgur.com/a/IevJFRw i have tried the dot operator to access the property it gives undefined const data = { channel: null message: 'hi deepak' receiver: 3 sender: 4 time: {$date: 1555993671...
Arush Singh
0

votes
1

answer
13

Views

Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only support

I am going to receive an object like the following: BOI BOI SBH SBH BOI 2234682 bsnl 1116 SCIENTIST 'E' B Rama Krishna Reddy 51910 false A- N 01-07-1958 00:00:00 B Pulla Reddy(Late) M M and here is my interface export interface IEmployeePersonalInformation { EmployeeCode: string; EmployeeName: strin...
rammi
0

votes
0

answer
7

Views

How should I set the language en to get only english results from the PlacesClient by Google in Android?

Here are the coordinates I am passing into the emulator: Latitude: 25.0783 Longitude: 55.172 Its not giving me the desired results. Below are the results returned: Dubai AE-DU AE - دبي - United Arab Emirates دبي - الإمارات العربية المتحدة دبي - الإمارات الع...
Sachin Rupani
1

votes
1

answer
646

Views

InvalidArgumentException JKS not found sheets API

I am working on an android app that needs to interact with drive/spreadsheets. I was using the google drive for android API, but not only was it way too convoluted to figure out, it never worked right. So I switched to the REST API. I tested the app in plain java before trying to add it to android....
mirGantrophy
1

votes
1

answer
1.6k

Views

Module 'react' does not exist in the Haste module map

I am trying to do LinkedIn integration in my app. So, I have done as below : Installed dependency as below : npm install react-native-linkedin --save; So, while launching the app, am getting below error : Failed to load bundle(http://localhost:8081/index.bundle? platform=ios&dev=true&minify=false...
Vishal Zaptech
1

votes
1

answer
429

Views

Fetch : status 302 in Edge 17

I'm using js fetch API to retreive datas from JSON. It's working fine (even in IE 11), except in Edge 17 i get 302, the response header are : Content-length : 0 Content-type: text/plain; charset=utf-8 Location: http://local.mysite.com/xxx My local website is on a Mac, i'm using BrowserSync to make i...
Julien CHAZAL
1

votes
1

answer
301

Views

Sharing image via LinkedIn API v2 appears cropped and different from sharing on www.linkedin.com

When an image is shared to a profile (not a Company) via the LinkedIn API v2 it displays as if it is cropped: However, when I upload and share the same image on www.linkedin.com to my profile it does not show as cropped and the entire image is shown: This is happening for both square and rectangular...
Ari
1

votes
1

answer
918

Views

Kafka producer difference between flush and poll

We have a Kafka consumer which will read messages and do so stuff and again publish to Kafka topic using below script producer config : { 'bootstrap.servers': 'localhost:9092' } I haven't configured any other configuration like queue.buffering.max.messages queue.buffering.max.ms batch.num.messages I...
shakeel
1

votes
1

answer
61

Views

In WSO2 ESB is validate XML before coming to the api

Is there a way to validate XML coming to the WSO2 ESB API since in order to validate. I'm getting an error when the wrong XML comes to my API. This is the error I'm getting when it comes to the API I want to validate before that. [2018-10-19 10:00:03,531] ERROR - LogMediator Could not build full log...
Malinda Peiris
1

votes
2

answer
163

Views

How to add item to json object ruby on rails?

I want to join items from 2 tables. There output: 'costs':[ { 'id':2, 'cost_name':'rent office', 'user_id':2, 'fix':true, 'amount':300300, 'created_at':'2018-11-05T18:36:19.108+06:00', 'updated_at':'2018-11-05T18:36:19.108+06:00' }, { 'id':3, 'cost_name':'new computer', 'user_id':2, 'fix':fals...
Arkhatinho
1

votes
1

answer
636

Views

how to import swagger in Azure API Management

I see a couple of articles and videos where they import Swagger. But with the new UI changes I am not able to find where to import Swagger. In the video reference it was showing in WADL or Swagger option now I do not see Swagger option. Has this option been removed?
kumar
1

votes
2

answer
905

Views

How to get client secret via Keycloak API?

How to get client secret via Keycloak API? In documentation I see: GET /admin/realms/{realm}/clients/{id}/client-secret My code is the following: data = { 'grant_type' : 'password', 'client_id' : 'myclientid', 'username' : 'myusername', 'password' : 'mypassword' } response = requests.get('https://my...
president
1

votes
1

answer
96

Views

Vimeo authorization is not working, redirect_uri didn't match?

I write the code to redirect the user to Vimeo for authorization. https://api.vimeo.com/oauth/authorize?client_id={client_id}&response_type=code&redirect_uri={myownurl}test&state=INDIA When this url opened in browser It say 'Dear app owner, your redirect URL appears to be misconfigured. Check your...
Anirudha Gupta
1

votes
1

answer
855

Views

Get r_liteprofile and r_emailaddress - api.linkedin.com/v2

How to get email address and lite profile from linkedIn api v2 (api.linkedin.com/v2) Can not get email from https://api.linkedin.com/v2/me?oauth2_access_token=xxxx Requested &scope=r_emailaddress%20r_liteprofile
CaSpEr
1

votes
4

answer
590

Views

AWS API Gateway Websockets — where is the connectionID?

I am setting up an AWS API Gateway Websockets with a custom authorizer on the $connect route, as described here: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-route-keys-connect-disconnect.html My question is -- how do I get the connectionID, ie the identifier...
Big Endian
1

votes
2

answer
278

Views

Can't access variable key inside .env (dotenv package React)

So I'm trying to understand how to use .env to secure my api key & data for my login auth. I've followed the process of the dotenv package and the stackoverflow answer here. What I did: 1. I installed the dotenv package 2. In my rootfolder, I added a .env with only one line: API_AUTH=http://myapilin...
Cédric Bloem
0

votes
0

answer
5

Views

How to format XML in Post body for as asp.net WebAPI POST route

I Have an asp.net WebAPI RESTful service, where I have a POST endpoint for GPS positions. The server controller has the following route.. public HttpResponseMessage PostGpsPositions(GpsPositionsModel positions) The body classes are as follows public class GpsPositionsModel { [Required] public int S...
peterc
0

votes
0

answer
6

Views

Problem with Google Vision API - Object Localization is not working properly

I'm working on the image below. Trying to recognize the coordinates of the bottle by running this piece of code: from google.cloud import vision from google.protobuf.json_format import MessageToJson from google.protobuf.json_format import MessageToDict def localize_objects(self, path): client =...
rafasalo
1

votes
1

answer
74

Views

Template deployment to Azure API management with swagger fails with 'path' must not be empty

I am trying to create an API and operations in azure API management using the swagger import feature, using a template derived from the doumentation at https://docs.microsoft.com/en-us/azure/templates/microsoft.apimanagement/2018-01-01/service/apis Every time I deploy my API using my Azure Resource...
alastairtree
1

votes
1

answer
38

Views

Valid authentication credential for Android Management API

I'm learning to work with api and now I try to get a list of devices runing a python script from the console. Client Library for Python installed. sample.py import pprint import sys from apiclient.discovery import build import json api_key = 'AIzaSyBNv8k-zm_TkytbBMJVkR7_wjc' service = build('android...
Jekson
1

votes
2

answer
32

Views

Capture status after making a stripe api charge

I am looking for the php code syntax to capture if the call was successful or failed to stripe API. I need to capture one of the objects property to determine this but I am not sure what the best approach is. Here's a sample response from a successful ACH api charge. I am looking for the php code sy...
R.P.
1

votes
1

answer
28

Views

How to get API post request with json data

I'm triyng to make an API request using postman and body raw data, but I can't read the data on server side. My request: http://prntscr.com/n38hes http://prntscr.com/n38hq9 I've already tried: app.post('/test', function (req, res) { console.log(req.query) }) and: app.post('/test', function (req, res...
Paulo
1

votes
2

answer
43

Views

Kafka consumer is reading last committed offset on re-start (Java)

I have a kakfa consumer for which enable.auto.commit is set to false. Whenever I re-start my consumer application, it always reads the last committed offset again and then the next offsets. For ex. Last committed offset is 50. When I restart consumer, it again reads offset 50 first and then the next...
svbp
1

votes
2

answer
25

Views

Google Maps Heatmap works only when the heatmap data is hardcoded and not when it is generated using a for loop

I am trying to plot a heatmap on Google Maps using the API. On using a hardcoded array of LatLng objects, the rendering works. However, if I then try to remove the hardcoded array and generate the array using a for loop, the rendering fails. console.log for the 2 array variables give me the same obj...
Chaos

View additional questions