![]() |
Curl request - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Curl request (/showthread.php?tid=91178) |
RE: Curl request - pippuccio76 - 06-30-2024 (06-30-2024, 12:46 AM)ozornick Wrote: Allow redirect for CURL? this is the documentation : https://connect.taxi.booking.com/authentication/getting-started/ RE: Curl request - kenjis - 07-01-2024 It seems "Content-Type: application/x-www-form-urlencoded" is missing in your request. RE: Curl request - pippuccio76 - 07-06-2024 (07-01-2024, 04:06 PM)kenjis Wrote: It seems "Content-Type: application/x-www-form-urlencoded" is missing in your request. how can i insert as parameter of arrray ? RE: Curl request - kenjis - 07-06-2024 See https://codeigniter.com/user_guide/libraries/curlrequest.html#headers RE: Curl request - pippuccio76 - 07-07-2024 (07-06-2024, 03:24 PM)kenjis Wrote: See https://codeigniter.com/user_guide/libraries/curlrequest.html#headers Code: $apiURL = 'https://dispatchapi-sandbox-qa.auth.eu-west-1.amazoncognito.com/oauth2/token?grant_type=client_credentials'; Error 400 now Debug : Code: * Trying 63.33.31.164:443... RE: Curl request - kenjis - 07-07-2024 See https://codeigniter.com/user_guide/libraries/curlrequest.html#auth RE: Curl request - pippuccio76 - 07-07-2024 (07-07-2024, 03:41 PM)kenjis Wrote: See https://codeigniter.com/user_guide/libraries/curlrequest.html#auth the curl url haven't auth as username and password : Code: curl -X POST --user '<CLIENT_ID>:<CLIENT_SECRET>' -H 'Content-Type: application/x-www-form-urlencoded' 'https://dispatchapi-sandbox-qa.auth.eu-west-1.amazoncognito.com/oauth2/token?grant_type=client_credentials' RE: Curl request - kenjis - 07-07-2024 I don't get what you say. All you need to do is to set the correct options for the request. If the following command works, show the debug output and know all the request headers. Code: curl -X POST --user '<CLIENT_ID>:<CLIENT_SECRET>' -H 'Content-Type: application/x-www-form-urlencoded' 'https://dispatchapi-sandbox-qa.auth.eu-west-1.amazoncognito.com/oauth2/token?grant_type=client_credentials' After that, configure the options that send the exact same request headers. That's it. RE: Curl request - pippuccio76 - 07-08-2024 (07-07-2024, 04:27 PM)kenjis Wrote: I don't get what you say. This is in the booking taxi api documentation , i don't know if work because i don't know how set in this way by use with curlrequest(); RE: Curl request - kenjis - 07-08-2024 If you don't know how to send a correct request, nobody cannot help you. Why don't you ask to the technical support of the api provider? |