I am trying to fetch the record from the api. It’s working correctly on postman but giving the error when I use curl in php. Here is my PHP Code: Here is the error I am getting after curl: error after curl option On the Postman it’s giving the result perfect as expected: postman result Furthermore api url working perfect
Tag: api
Laravel/Angular “Password Expired” auth flow
I am using Laravel 7.* for my API and Angular 9 for my frontend. I am having trouble figuring out how to handle Password Expiration responses from my api. My current auth workflow is this: Angular POST /login request to API with an expired password API receives POST request, authenticates the credentials. If authenticated, API checks to see if the
Get php input values
My goal is to have a WordPress form that when posting, send the input to an API into an ERP. Right now it seems that the values are empty when sending the way I do. In CURLOPT_POSTFIELDS if instead of …
Duplicate whole spreadsheed using Google Sheets API
I have a spreadsheet with prepared template and a bunch of Apps Script code to work with sheets. I need to export data into this template using Google Sheets API, but doing it in the same spreadsheet for all users is not the best idea. Therefore, I need to create a new spreadsheet for each user. I managed to create
Undefined index on laravel8
I’m learning to display public API data from http://batikita.herokuapp.com/index.php/batik/all I have tried to display data with the following syntax: InfoController.php index.blade.php And the result is like this: enter image description here What is the correct syntax for displaying data from the public API with laravel8? Please help, thank you. Answer Your error doesn’t actually have something to do with Laravel,
PHP Notice: Trying to get property ‘id’ of non-object. How to resolve?
I am using cURL and PHP to make a request to a test API to return a list of users but I get the following error: PHP Notice: Trying to get property ‘id’ of non-object Not sure where I am going wrong. Here is my code Answer you have to loop through the response:
How can PHP pull the JSON data from VIMEO API and print it on XML file?
I am calling the following Vimeo API to return all the videos under the specific videos. What I was trying to achieve is to only pull the particular JSON data that I desire to. “uri” and “name” is the only data that i need. And how can I print this thing to a XML file? https://developer.vimeo.com/api/reference/folders#get_project_videos BTW this is my
Listing buckets in cloud storage project using PHP API
I’m trying to list out all (some, even) of the buckets in my storage project. If I know the name of a bucket, the “bucket” function will get the bucket. But I can’t use “buckets” …
Change status code in HTTP header without affecting return data in Yii 1 Restful API
I want to return data with the HTTP error code in Yii 1. So I used the following way to get the data. When I use it this way API returns data with 200 error code as below But I want to change header status 200, so I threw exception for this, then output data also changed. I want to
Trigger laravel event from wordpress
I’m currently working on a laravel app. The same app is already running on wordpress and through the laravel application we are going to add some additional features in original application. The laravel will run on the subdomain. Here is the thing: On wordpress website, we are publishing different public articles but on the publishing of these articles we need