Open florp-fe opened 6 years ago
Hi, is you app security set to crypt
in UI ?
BTW this is stated in https://phpipam.net/api/api_documentation/ :
GET /api/?app_id=<APP_NAME>&enc_request={encrypted_request}
Try providing app_id and enc_request via GET attributes, e.g. append to request URL.
Thanks.I have solved it by not using CURLOPT_POSTFIELDS. I have inserted the fields in url.
Next issue, subnet searching is not working. Tried with
Regards,
Hey @florp-fe
I'm facing the same issue. #12 too. Did you manage to have a workaround? I dunno what I'm missing.
I have upgraded from 1.2 to 1.3 because the crypt method with multiple parameters wasn't working. Now, in 1.3 I can't get a response from phpipam The command is ----" curl -X GET -H "Content-Type: application/json, token: aa2ebe94307eb850a349109135b54045" -d '{"app_id":"xxx","enc_request":"ylQRQ8m4g%2BQYZKeMqwAGRKRoBatg0EI6L6tNZqkLY4Y%3D"}' teh "http://10.101.0.13/phpipam/api/"
The response is ----- {"code":400,"success":0,"message":"Invalid application id","time":0}
I have tried with the master php php-client as well, same result. I have tried making the call from php "$req['controller'] ="subnets" $req['action'] = "read"; $req['format'] = "ip"; $req['id'] = "199"; $encrypted_request = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $api_key, json_encode($req), MCRYPT_MODE_ECB)); $par['enc_request'] = $encrypted_request; $par['app_id'] = $api_app_id; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, count($par)); curl_setopt($ch, CURLOPT_POSTFIELDS, $par); $result = json_decode(curl_exec($ch),true);
"
On version 1.2 was working with the url ".../phpipam/api/v1/" Now on 1.3 the ul is url ".../phpipam/api/" .Should I do something else?
Thanks!