I’m trying to create a google chat space via making a post request to https://chat.googleapis.com/v1/spaces with Guzzle. In response I’m getting: But if I change the body of the request and add some new invalid fields like this: I’m getting the next response: docs: https://developers.google.com/chat/api/reference/rest/v1/spaces/create What’s wrong with my original request? Thanks. Answer The spaces.create documentation explains this at the
Tag: guzzle
MS Graph | PHP | GET Photo – Laravel 404 exception
I’m building a website with Azure authentication using MS Graph. As you can see below I want to login and get my own data as well as my managers which is working fine, however the issue begins when I want to select the photo. When a user does not have a profile photo set it will return a 404 Not
Guzzle: Sending POST with Nested JSON to an API
I am trying to hit a POST API Endpoint with Guzzle in PHP (Wordpress CLI) to calculate shipping cost. The route expects a RAW JSON data in the following format: Link to the API I am consuming: https://developers.cjdropshipping.com/api2.0/v1/logistic/freightCalculate I’ve also tried using ‘json’ => $body instead of the ‘body’ parametar. I am getting 400 Bad Request error. Any ideas? Answer
Guzzle Symfony scrape iframes inside multiple Servers
I am building a scraper to scrape content using guzzle and symfony dom crawler But I run into an issue. The page I am scraping has multiple Iframe servers They default iframe is shown when the scraper loads the page but in order to get the other servers it needs to click there buttons and so it reflects the server
How to set referer Header in Guzzle and get CDN Content
I want to scrape a website and am using guzzle 7.4 and Symfony Dom Crawler I successfully retrieved the HTML data But the website is using CDN to host some resources and they are not loading because the header is not sent to get those resources below is code retrieving html If I access the CDN directly and set referer
Transforming Twilio library request into Guzzle request
unfortunately our project runs on PHP 7.0 and we cannot upgrade it for now. And Twilio’s library uses PHP 7.2+ on the version that contains the trusthub API support. So I’m trying to do the request “Create EndUser of type: customer_profile_business_information” from this doc page using Guzzle instead of their library, and I’m following instructions from the curl example. Everything
Laravel uses incorrect database when Http request is sent from another Laravel app
I seem to be running into a weird issue. I am triggering a post request using the Http facade from a laravel app to another laravel app. Both these apps are linked to separate databases. When I try to trigger the same endpoint using postman, it works fine but when the request is triggered from the other laravel app, the
Laravel Http::post : Am I (really) sending a “bad request”?
I’m new with Laravel, not sure of this one. I’try to retrieve this token from a FileMaker API in my Laravel app. In order to obtain it, I use a custom authentication service in my AuthServiceProvider with the Auth::viaRequest method. The request inside the method is quit simple. It’s just a basic auth POST request to the api url. The
Using Guzzle to retrieve API via (POST), unable to pass JSON parameters for query
I have created an API request, it connects to the server fine and passes basic authentication. The error I receive is “Uncaught GuzzleHttpExceptionClientException: Client error: POST http://my.api.com/dest/addr resulted in a 400 Bad Request response: {“code”:400,”result”:”Missing customer id” I have tried many ways to pass the query parameters and none of them have worked. I checked to make sure the JSON
Sentry Transport errors
I’m trying to implement Sentry in our application. I’ve used sentry/sdk but got some errors (probably due to some PHP settings), so I’m now trying to switch the transport method. I removed sentry/sdk from my composer.json file and replaced it with sentry/sentry and php-http/guzzle7-adapter. Please note that in the documentation, they use the guzzle6-adapter, but that gave dependency errors (I