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
Tag: guzzle
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
Guzzle query string prameters
I’m having problems writing my request. I need to provide query string parameters to GET method using request(). Since I’m writing tests I can’t edit the method. Right now I have it written like this: Method that gets paginator_data: And thats how query looks if I check the request testing it from the front-end: Source: Parsed: how do I format
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
Laravel streamDownload a pdf file from a guzzle request
I have setup the following method using Guzzle and Laravel’s streamDownload(): And while I have confirmed that this API does return a PDF file, the PDF being returned by laravel has 0 bytes, what am I doing wrong? Answer I was missing a echo inside the callable function:
PHP get JSON Web Token with Guzzle
I use Laravel 5.3 with GuzzleHttp 7 and want to make an API-Call to another Server in order to authorize and get a JSON Web Token in return. The curl command runs perfectly fine and returns a JSON Web Token with status code 200: In PHP: Answer I have made small changes to your code to make it more better,
Conditional unset from Guzzle response
I’ve seen a few questions and the ones worth referencing How can i delete object from json file with PHP based on ID How do you remove an array element in a foreach loop? How to delete object from array inside foreach loop? Unset not working in multiple foreach statements (PHP) The last two from the list are closer to
Laravel Http request to route sends forever
I want to have a link in an email that send to the user, the link is the url of the site and has an api token for the user to authenticate with. however I am trying to send an api request to get the user details so I can authenticate the user and redirect them to the relavent page,
Guzzle fails to authenticate with shopware5
I am trying to port the following working HTTP_Request2 code which query shopware5 API to Guzzle 7 I have tried the following, but it fails with the message “Invalid or missing auth” Answer You need to change your code As Digest has md5, so verify as false does not make it insecure, but I have not found it anywhere written
Laravel Passport callback route returns null
I am learning Laravel Passport and developing an OAuth2 server. After creating a client I made the following call to get the authorization code The call works as expected and I got the authorization code, however when redirecting to the callback route which is defined like so It didn’t work, the response instance is just null. I can’t figure out