Policies
\Modules\Api\Policies
Introduction
This API is dedicated to the compliance of your application with the GDPR.
Each application has a dedicated menu in the backoffice to add rules relating to the recovery and use of the user's personal data.
This menu allows you to add explicit information as a tutorial (for example) to explain how your application or website uses your users' data.
Obtain the consent of the user to recover his personal data. Consent must be clearly stated by the user.
Note
Back office link to manage your rules for the use of the personal data of the users :
dashboard.appspanel.com
This API allows to retrieve and display the rules to the user as a modal.
For each rule, a user action can be made so that it chooses if it wishes to activate the function or not.
This API manages the multilingual, it will automatically return the rules according to the language of the device of the user.
It is therefore important that you write the rules in as many languages as necessary for your application in the Apps Panel backoffice.
Important
Since the API call requires a user token parameter, it is important to call this API once the user has been registered.
Methods
get
<?php public static function \Modules\Api\Policies::get($token = null)
Description
Get policies.
Parameters
token
User's token
Return
{
"title": "title of the modal (editable in backoffice)",
"intro": "Introduction text of the modal (editable in backoffice)",
"label_button": "Label button validate (editable in backoffice)",
"data": [
{
"id": 1,
"title": "policy 1",
"content": "content policy 1"
},
{
"id": 2,
"title": "policy 2",
"content": "content policy 2"
},
{
"id": 3,
"title": "policy 3",
"content": "content policy 3"
}
]
}
Note
The 3 fields
title
,intro
andlabel_button
correspond respectively to the 3 keyspolicies_title
,policies_intro
andpolicies_label_button
which you can modify in the textmanager menu of the Apps Panel backoffice, in order to customize the content to be displayed to the user, and also to manage the multilingual.
Important
For APIs regarding user actions (accept or deny permission, retrieve user responses), see User Privacy section.
Example
Get the policies of current application
<?php
namespace App\Modules;
use \Lib\Controller\WSController;
use \Modules\Api\Policies as PoliciesController;
/**
* Class Policies
* @package App\Modules
*/
class Policies extends \Modules\Elements
{
/**
* @description get the policies of this application
* @param WSController $controller
* @param array $params
* @doc string $token user's token
* @return array|boolean
* @throws \Lib\ApiException
*/
public static function get(WSController $controller, $params = array())
{
$token = !empty($_SERVER['AP-UTOKEN']) ? $_SERVER['AP-UTOKEN'] : $params['token'];
return PoliciesController::get($token);
}
}
Updated over 6 years ago