v3 Créer un fichier chiffré

Description :

crée un fichier chiffré

URI :

https://api.multitel.net/v3/create_encrypt_files

Paramètres :

Required: (POST request only) 
- proof_type_id: proof type of encrypt file 
- files[] : file list to encrypt
- description : encrypted file description

Méthodes :

POST


Exemple de sortie :

{
  "status": {
    "code": 200,
    "msg": "Encrypt file has been created successfully"
  },
  "response": {
    "entity_type": "identities",
    "proof_type": "971bc00f2ea07fbbceb773490295fda7",
    "ids": [
        {
          "id": "3a0334a5-ce0d-4fc5-a8fc-321231fad709",
          "name": "8376688.png",
          "expired_at": "2024-10-22 09:32:35"
        }
     ]
  }
}

Exemple de code :

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.multitel.net/v3/create_encrypt_files',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('proof_type_id' => '971bc00f2ea07fbbceb773490295fda7','files[]'=> new CURLFILE('/C:/Users/AAA/Documents/8376688.png'),'description' => 'Passport'),
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: application/json',
    'Authorization: Basic YWRtaW46Vnc0OXB11',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Rechercher dans la documentation