Curl request |
(07-08-2024, 02:23 AM)kenjis Wrote: If you don't know how to send a correct request, nobody cannot help you. I don't know how to translate this : 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' to ci code .... The api is written from booking.com developer I think it works
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. All options are shown in https://codeigniter.com/user_guide/libra...st-options
(07-08-2024, 04:30 AM)kenjis Wrote: If the following command works, show the debug output and know all the request headers.can i use this command : 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' directly in controller method ?
i transform with a online script :
Code: $ch = curl_init(); it work : Code: access_token => string (975) "eyJraWQiOiJVRFcwVzJwRUFrNCtxakdhRVUxOFA0ZStjSlNiQjRmQnA2dl........................ |
Welcome Guest, Not a member yet? Register Sign In |