Discussions

Ask a Question
Back to All

Auth

Hello ,

i am tring to create an application and to upload a doc but unfortunately i got an Error "401 => sorry ,you could not be authenticated with those credential"
and i got the new token under (POST) https://api.personio.de/v1/auth?client_id=123&client_secret=123

this is my API call

", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\"first_name\":\"john\",\"last_name\":\"doe\",\"email\":\"[email protected]\",\"job_position_id\":123}", CURLOPT_HTTPHEADER => [ "X-Company-ID: 123", "accept: application/json", "authorization: Bearer (token from )", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }