Questions tagged [api]

Please refrain from using this phrase. Instead, utilize specific tags such as [google-cloud-platform], [facebook], or [amazon-web-services]. When appropriate, include the tag [api-design]. Queries seeking recommendations or assistance in locating an API are considered inappropriate for discussion on this platform.

"Encountering a 500 internal server error while trying to connect AngularJS with

I am having trouble saving data from AngularJS to an API as I keep getting a 500 internal server error. The controller is an array that holds the scopes coming from the HTML page. Any assistance would be greatly appreciated. Controller $scope.save = func ...

Trying to execute Python scripts in Selenium IDE as a test suite

I'm facing a couple of issues when trying to run multiple Python test scripts exported by the Selenium IDE Python Remote Control plugin formatter. 1) The browser window automatically closes after a python script is completed. I am using Firefox for my tes ...

Console displaying API results but not appearing in browser window

class App extends Component { state = { data: '' } componentDidMount() { axios.get(`https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=wikipedia&utf8=&format=json`) .then(res => ...

Encountering a JSONDecodeError with the message "Expecting value: line 1 column 1 (char 0), I have come across this

Looking for a solution to the JSONDecodeError: Expecting value: line 1 column 1 (char 0) error? Check out the code snippet provided below: from urllib.request import urlopen api_url = "https://samples.openweathermap.org/data/2.5/weatherq=Lon ...

Methods to Exclude api_key from URL in AngularJS

To make a GET request to a REST API, I require an apikey. The request will be formed like this - $http.get() The response from the API will be in JSON format. However, for security reasons, I don't want the api key to be visible in the URL. Is there any ...

Limitations on Embedding Videos with YouTube Data API

I have been using the Youtube Data API to search for videos, but I am encountering an issue with restricted content appearing in the results. Specifically, music videos from Vevo are showing up even though I only want videos that can be embedded or placed ...

Dealing with unfamiliar outcomes from API requests in PHP

My current challenge involves calling a SOAP-API and finding a way to determine the existence of an object on the target server based on the returned data. The API calls involved are: ContactGet, CustomerGet, and UserGet. If ContactGet returns a match, t ...

How about conducting unit tests for a JSON formatter?

Currently, I am in the process of developing a library that has the ability to take a JSON string and format it based on a template and specification selected by the user. Lately, I have begun writing Unit Tests for this library and have encountered diffi ...

Adding an image to a React component in your project

I am currently working on an app that utilizes React and Typescript. To retrieve data, I am integrating a free API. My goal is to incorporate a default image for objects that lack images. Here is the project structure: https://i.stack.imgur.com/xfIYD.pn ...

Error: The object of 'NoneType' does not have the attribute 'group' in the googletrans module

My goal is to translate unknown language strings to English using a Python package called googletrans, which utilizes an API for this purpose. Here is what I attempted: from googletrans import Translator translator = Translator() translator.translate('안 ...

Utilizing HTTPS for OpenWeatherMap API in JavaScript encounters obstruction

I'm currently working on a project with free code camp where I am attempting to create a weather app using the OpenWeatherMap API. However, I have encountered an issue. My project needs to be submitted on Codepen and use HTTPS for geolocation. Due to ...

Improving the Appearance of JSON Data on Android: Step-by-Step Guide

My Android application displays raw JSON data from an API, but I want to format it in a pretty print style like this: https://i.stack.imgur.com/hJSe3.png Instead of the current display which looks like this: https://i.stack.imgur.com/kLH9l.png Here is ...

What process allows for this Twitter API response to be converted into HTML format automatically?

It is common knowledge that Twitter operates in an API-centric manner, meaning all Twitter apps retrieve their data through the API. Upon accessing (or .xml for those who prefer), a JSON formatted result with plaintext content and no additional formattin ...

Typescript types for the Google Calendar API

Is there anyone out there who can confirm whether the google Calendar API (via the npm package googleapis) for node.js or browser supports types that can be utilized in TypeScript? This would allow for a more strongly typed approach in projects using node ...

What is the process for sending confirmation emails through Moneris after a purchase is successfully made?

My workplace has a system in place for processing credit card transactions, but oddly enough, there doesn't seem to be any API integrated into the webpages. We utilize Moneris for this purpose and all I can see in the code is: <?php $monerisURL = ( ...

DRF: Avoid exposing the API

Utilizing Django in conjunction with Django Rest Framework, I have made the browseable api inaccessible in the settings.py file. Despite this configuration, when I navigate to http://example.com/api - with "example.com" representing my domain - I encounter ...

Bringing in the node-spotify or spotify-web modules to the browser for seamless integration

Has anyone successfully used Spotify's Playlist API in a browser? It seems that the web API only covers metadata, and to access the full API I need to use libspotify. Do I need to set up a Spotify API server myself or use node libraries like node-spot ...

The information retrieved from an API fails to populate the table on the NextJS platform

I am facing an issue while trying to populate a table using an API call in NextJS. I have used the getStaticProps function to retrieve the data and pass it to the component. However, when I attempted to use the map() function to iterate over the data objec ...

Setting up a Node + MongoDB API in the Cloud on either AWS or GCP

Currently, I am developing a Node.js + MongoDB API that is hosted on a virtual machine on Google Cloud Platform. The data for the API is stored in a MongoDB instance running on the same VM. I am wondering if it is advisable to run a local MongoDB instance ...

What is the web address to access when removing an object from the system?

I have set up a local server to experiment with an API in Django. My model, 'Users', is filled with multiple objects and I am utilizing DefaultRouter. If I wanted to DELETE a specific object from this model, what would the URL look like? For instance, for ...

Exploring the Integration of Two Independent Microservices via RESTful API for Data Exchange

Is there a way to establish a connection between two distinct APIs in different programming languages? Specifically, I have an application built in node.js with MongoDB and another one in Python with MySQL. I'm facing the challenge of establishing a 1: N r ...

What could be causing the 403 Error when using Blogger API with AngularJS?

I'm relatively new to working with 3rd Party APIs and I'm currently exploring how to integrate Blogger's API into my AngularJS website to create a blog feed feature. After setting everything up, I've made a request and received a 200 s ...

Issue with formik onchange event not filling data in Material UI TEXTFIELD component

Greetings! I am currently working on a React project where I am managing the authentication process. I am using Material UI and Formik for validation and handling input changes. However, I encountered an issue with my onchange Formik handler in the TEXTF ...

Retrieving data from an API on an Android platform

While attempting to retrieve data from an API that requires a key, the output states "app key not found". However, I have successfully tested it using Postman. Below is the code snippet: public class fetchData extends AsyncTask<Void,Void,Void> { ...

Tips for extracting a value from a currently active list item's anchor tag with JQuery on Mapbox API?

Currently, I am attempting to extract the value from a forward geocoder that predicts addresses while a user is typing. My goal is to then send this value to a form with an id of "pickup". However, I am encountering difficulties in capturing the li > a ele ...

Converting a string parameter into a JSON stringified object in Express.js

Struggling with creating a query parameter to stringify a JSON object. Does anyone have any tips or solutions? ...

Incomplete Data in POST Method API

I'm encountering an issue when using the POST method in Postman client to interact with Airtable. Despite following the API documentation example exactly and updating the authorization key, I keep getting errors. Oddly enough, the GET method is functionin ...

What is the process for implementing a filter to retrieve specific information from the data.gov.in API?

I am currently working on accessing air traffic data for my region using the data.gov.in API. Here is the link to the API I am utilizing. I am interested in learning how to implement a filter to acquire specific city data, such as Noida. ...

Error encountered while using the Braintree PHP SDK cURL functionality

Every time I attempt to generate a client token using Braintree_ClientToken::generate(), I keep receiving a Braintree_Exception_SSLCertificate exception. Despite having the SDK installed and meeting the minimum PHP requirements, I can't seem to figure ...

Using Vue.js to create dynamic routes that fetch and utilize a unique parameter ID

user/index.vue <tbody> <tr v-for="item in items" :key="item.id" > <td v-if="false" v-text="item.id" /> <td v-text="item.name" /> ...

How can one create a long-lasting variable in Node.js that persists throughout the application's lifespan?

Currently, I am in the process of developing a web service known as 'A' using Node.js. This service will need to communicate with another service called 'B'. In order for A to properly function, it must initially obtain an access token from B and periodica ...

Extract data from an API endpoint using JavaScript or React

I have the primary website link, which necessitates an authorization header for access every time. //console.log contains this information - accounts:[{categoryId:"some info"... }] api/v2/accounts To extract accountId and categoryId from the i ...

What is the best way to utilize multiple gmail accounts within a python project using the gmail API?

I am currently working on a project that involves integrating multiple Gmail accounts. I have successfully added the first Gmail account and it is functioning smoothly. However, I encountered an issue when trying to add additional accounts. Upon checking G ...

Requesting an API token through the body using Javascript's Fetch function

I'm currently working on developing a frontend application using Javascript Fetch to interact with an API service. One of the tasks I need to accomplish is to create a token by using the POST method and sending an apiKey parameter in the Body. Once I have ...

Troubleshooting Plesk 12 API Connection Issues due to cURL Connection Reset

I'm currently utilizing cURL to send requests to the Plesk API. Whenever I attempt a request that involves extensive processing by Plesk (like creating or deleting a subscription), I encounter a "connection was reset" error in my browser after approx ...

Error: The function semrush.backlinks_refdomains does not exist as a valid function

Hey there! So I've been working with the SEMRUSH API and encountered an issue when trying to retrieve data using backlinks_refdomains and backlinks_refips. However, when I called the domain_rank function, it responded in JSON format without any proble ...

Querying objects using a PHP API

Currently facing an issue with the API documentation I'm working on. Despite testing the code, it simply isn't functioning as expected. After spending a considerable amount of time analyzing it, I seem to be at a loss in figuring out where the error lies. ...

Tips for resolving validation errors when adding to MongoDB in a MERN application

Currently, I am in the process of mastering the MERN stack by developing a straightforward shopping list application. My API is set up to handle GET, POST, and DELETE requests successfully, as confirmed through Postman testing. Locally, I can retrieve it ...

The Node.js application encounters a blank response when making a GET request to the API

As a newcomer to node.js, I'm attempting to describe the issue at hand as clearly as possible. If clarification is needed, please let me know. In my current node.js project, I am faced with a challenge where I need to take a code received from the respons ...

Create an additional data field in an existing resource using the PUT method

Incorporated Google authentication into my NextJS application. The process involves the user making progress within the web app, which is stored in local storage as an array. If the user decides to register, I receive the session back and then send a PUT r ...

``We can showcase API data using various endpoints and then present it on a web page using

Hello from Argentina! I'm new to programming and recently started a Flask project. I've successfully displayed information from an API using one endpoint and rendered it with Flask. However, I'm now facing the challenge of displaying informa ...

Error in NodeJS testing: Attempting to read property 'apply' of an undefined value

I am delving into the world of Jest unit testing and exploring NodeJS for the first time. Currently, I am attempting to test my API using the code snippet below: const request = require('supertest'); const quick_registration = require('../. ...

Guide to fetching and displaying a PDF file in the browser using Vue.js and Axios

Despite successfully using Axios to download a pdf file on the browser with correct page numbers and orientation, the content appears to be empty. Here is the API code snippet: [HttpGet] [Route("~/api/Document")] public HttpResponseMessage Get(in ...

Interacting with API through AngularJS $http.get

I am a beginner in AngularJS and I am trying to grasp its concepts by studying example codes. Currently, I have found an interesting code snippet that involves the $http.get function. You can find it here: I attempted to replace the URL with my own, but ...

I'm in the process of constructing a create-next-app and I need to retrieve data from a web API. However, I'm unsure of the best place to securely store the API key

I am working on building a create-next-app that will retrieve data from the News Catcher API and display it within my application. I have obtained an API key to access the News Catcher API. However, I am unsure of where to securely store the API key and h ...

Leveraging JSON Data for Dynamic Web Content Display

I have been attempting to parse and display the JSON data that is returned from a REST API without any success. When tested locally, the API's URL structure is as follows: http://localhost/apiurl/get-data.php It returns data in the following format ...

Interacting with Mailchimp's API through Groupings

Help needed in adding a MailChimp subscriber to a specific group. Subscription is working fine, but struggling with getting them into the desired grouping. Current code snippet: // ADD TO MAILCHIMP SUBSCRIBER $newsletter = $_POST['newsletter']; $newsl ...

Using an Angular HttpClient to authenticate with an API by utilizing a token for

I am currently attempting to fetch data from my Jenkins JSON API via HTTPClient. The data I need access to is restricted, so I must authenticate against Jenkins. To do this, I have generated an API Token. However, I am unsure of how to authenticate myself ...

Transmission of data through POST method in Hypertext Transfer Protocol

When I send a POST request, how can I retrieve the value associated with the key "success"? Here is what I have tried: @app.route('/register', methods=['GET','POST']) def vid(): if request.method == "POST": firstname=reque ...

Utilizing AngularJS to retrieve associated information from users via a JSON API

I'm currently utilizing the Ionic framework and my inquiry relates to AngularJS. I've set up a JSON API using Ruby on Rails and for authentication, I've opted for ng-token-auth + devise-token-auth. User JSON: { "data": { "id": "1", "type": "us ...

The communication between the Next.js and Node.js servers is being obstructed as the request body fails

Could you lend me a hand with this issue? Here is the function being called: function apiCreate(url, product) { console.log('Posting request API...' + JSON.stringify(product) ); fetch(url, { dataType: 'json', method: 'post ...

Transform a nested JSON response from an API service into a CSV file using Python

Every attempt to save the output of an API response into a CSV file in an organized manner has been unsuccessful. Below is the script used to retrieve API data: import json import requests import csv # List of keywords to be checked keywords = open("/tes ...

Error connecting to unix:///var/run/docker.sock from PHP due to permission denial

Currently, I am utilizing Docker Windows Toolbox. The docker container was set up using PHP-FPM: docker run -d -v /var/run/docker.sock:/var/run/docker.sock php:7.0-fpm-alpine When I directly use curl from the container shell: curl --unix-socket /var/ru ...

Sending data to API using AngularJS Http Post

Upon clicking "Add new User", a modal pop-up will appear with a form containing a text field and a checkbox. However, upon clicking the create button, the data is not being posted to the API and the modal pop-up remains open without closing. I would like ...

Is there a way to convert time measurements like minutes, hours, or days into seconds in React and then pass that information to an

Currently, I am working on an application that allows users to select a frequency unit (like seconds, minutes, hours, or days) and input the corresponding value. The challenge arises when I need to convert this value into seconds before sending it to the ...

pyOWM is failing to yield the desired outcome

After obtaining my API key, I attempted to integrate the code snippet below: import pyowm owm = pyowm.OWM('API key') mgr = owm.weather_manager() Forecast = mgr.forecast_at_place('London', '3h').forecast max_temperature=[] min ...

Unlocking Spotify: A Guide to Generating an Access Token through Web API Node

I visited the following link for more information: https://www.npmjs.com/package/spotify-web-api-node Here is a code snippet: var SpotifyWebApi = require('spotify-web-api-node'); // credentials are optional var spotifyApi = new SpotifyWebApi( ...

GA4 report API PHP client encountering filter errors

Having trouble applying a filter to a query, resulting in a fatal error. Here is the code snippet: require 'vendor/autoload.php'; use GoogleAnalyticsDataV1betaBetaAnalyticsDataClient; use GoogleAnalyticsDataV1betaOrderBy; use GoogleAnalyticsData ...

What is the best way to manage an unused parameter received from an API in a Flutter

In order to avoid Gson errors when parsing objects, I only need the name and id parameters for Dropdown. How can I handle unwanted parameters from the API response in a Flutter object? import 'package:meta/meta.dart'; import 'dart:convert'; c ...

A collection of text elements within an API request,

Correct Answer below. I need help with selecting products in bulk rather than individual calls. I've tried multiple syntax combinations but keep receiving 404 or 405 errors. I'm trying to compile a list of product codes, but the error codes persist. Ins ...

Python Script for Conducting a Google Search

Looking to develop a Python script that can take a user-entered question and fetch the answer using Google Custom Search API, Bing, or another search API. When attempting to use the Google Custom Search API, I encountered the following script: <script& ...

JSON API Status Reversal

I've been trying to figure out how to check the current status of the PlayStation server. This information is typically displayed on their webpage which can be found here: Interestingly, instead of using PHP database queries, PlayStation seems to uti ...

Create a loop to iterate through dates within a specified range using the Fetch API

When I need to get the exchange rate from the bank for a specific interval specified in the input, I follow these steps. The interval is defined as [startdate; enddate]. However, in order to make a successful request to the bank, the selected dates must be ...

Steps to upload an image using an API

I am attempting to use an API to upload a file to imgBB, but I encountered the following error message: {"status_code":400,"error":{"message":"Empty upload source.","code":130},"status_txt":&q ...

Customize JSON response formatting based on specific needs

When returning a JSON response to an API, I am utilizing the json_encode() method. The array includes a key for users that can contain multiple users, or be empty, and a key for course that can either be empty or contain a single object as shown below: { ...

Current CORS complications persisting with Vue 3, Axios, and ASP.NET Core Web API backend interaction

I am puzzled. While running my .net core server and loading the vue project in the same file, I encounter partial success. However, when I start testing the axios/fetch requests, the test project fails in other ways. My CORS policy is set to be very lenie ...

What is the reason behind the Wayback Machine Json API consistently returning only empty "archived_snapshots": {} elements?

I am attempting to utilize the Wayback Machine Json API in order to retrieve links to archived websites. However, when I follow the instructions provided on their website 1, such as using this URL: When using Python: request = requests.get('http://archiv ...

Creating a Node.js API with Firebase Backend

Hey everyone, I wanted to get some advice on a project I'm working on. I've read a lot about setting up Node/Express with Firebase, but I'm curious about potential challenges when it comes to building and scaling a custom REST API using Fire ...

Unable to retrieve information from the openweatherapi

I am currently working on developing a basic Weather App, and I have chosen to utilize the jQuery Ajax method to fetch data from openweathermap. The function I am using to retrieve the data is as follows: $(document).ready(function(){ $('#submitWeath ...

Retrieving information and implementing condition-based rendering using React's useEffect

I am currently developing a MERN stack application that retrieves information regarding college classes and presents it in a table format. The CoursesTable.js component is structured as follows: import React, { useState, useEffect } from 'react'; ...

Execute a repeated action to send multiple data values to a Python API endpoint

I have a Python API that retrieves and processes data based on the input parameter 'ID', returning a specific set of fields. Unfortunately, the parameter does not support passing multiple values at once. To address this limitation, I attempted to ...

Challenges with Filtering in MongoDB

I can't seem to figure out what's going wrong with my code. I've checked the documentation and it all appears to be correct. I've also gone through several posts and attempted various solutions. Code: router.get('/rank/:rank', async (req, res) => { ...

The preflight request for CORS failed the access control check due to not receiving an HTTP ok status

How can I resolve this issue? Backend: ASP .Net Web APP - API, IIS Frontend: Vue Error: https://i.stack.imgur.com/QG1Yw.png https://i.stack.imgur.com/3tKh7.png Fiddler: https://i.stack.imgur.com/diN08.jpg web.config: <httpProtocol> <cus ...

What are the steps for creating a Post, Put, or Delete request before fetching with a Get method?

Currently, I am faced with a challenge while using a websocket server to access data from an ExpressJS API. Whenever I perform a fetch operation that updates the database (Postgres) followed by a GET request, the new record is not being included in the res ...

Unable to add information using the REST API

I attempted to utilize a REST API in CodeIgniter for inserting data. Here's the code snippet I used: public function sensor_post(){ $data = array( 'sensor_id' => $this->input->post('sensor_id'), ...