Gerar código aceite

Gera um código do termo de aceite da politica de privacidade que será vinculado ao agendamento da solicitação via videoconferência

gera-codigo-aceite

POST <base_url>/videoconferencia-api/gera-codigo-aceite

Headers

Name
Type
Description

HMAC-Authentication*

String

HMAC

Content-Type

String

application/json

{
    ""
}

Código de exemplo

<?php

require_once 'HTTP/Request2.php';

$base_url = "https://arsolutihom.acsoluti.com.br/";

$uri = "{$base_url}/videoconferencia-api/gera-codigo-aceite";
$method = 'POST';

$hmacVersion = 1;
$clientId = 0;

$ds = $method . $uri ;

$key = 'CHAVESECRETAAPI';

$nonce = time();
$hkey = $nonce . $key;
$hmac = hash('sha256',hash('sha256', $hkey) . hash('sha256', $hkey . $ds));

$header = [
    'HMAC-Authentication' => $hmacVersion . ':' . $clientId . ':' . $nonce . ':' . $hmac
];

$request = new HTTP_Request2();
$request->setUrl($uri);
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setHeader($header);

$response = $request->send();

echo $response->getBody();

$codigo_aceite = json_decode($response->getBody(),true)['codigo_aceite'];

Resposta esperada

circle-exclamation

Descrição dos campos:

  • codigo_aceite : Código do termo de aceite da politica de privacidade gerado no SisAR.

Last updated