Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jpeterson579's avatar

How would I turn this curl request into a guzzle request?

How do I turn this curl request into a guzzle one that I can use in my laravel app?

curl -X GET -H "Content-Type: application/json" --user 9f881e5ac6bfdfc7f54244aab:905a12c https://yourdomain.something.com/api/v1/markcomplet

With required parameters 'user_id' and 'course_id'

I'm assuming -X is the request type, -H is the header, but what do I do with --user? This is where my API key goes..

Thanks for any assistance.

0 likes
3 replies
Sinnbeck's avatar

@jpeterson579 you should really consider upgrading. But answer is the same. Basic auth. Just Google guzzle basic auth

Please or to participate in this conversation.