Liste des clés Api

Get /settings/apikeys

Paramètres :

Aucun

Réponse :

Noeud de clés API :

Nom Description Type
id Id de clé API String
hash Login String
key Mot de passe String
iPFilterEnabled Si le filtre d'adresse IP est activé Boolean
allowedIPs Tableau d'adresse IP Array
description Description String
createdAt Date au format timestamp Int
updatedAt Date au format timestamp Int
enabled Si la clé API est activée ou non String
Langage de programmation :

Exemple de réponse :

							[
								{
									"id": "5f6ze54f6ze54f6ze5f4ze74",
									"hash": "fe6z45f6ze5f4ez6f4ze6f54zef9c5d8",
									"key": "3fzefze987f9ze8f7ze65f4ze654fzeb0",
									"iPFilterEnabled": true,
									"allowedIPs": [192.168.1.1],
									"description": "Application",
									"updatedAt": 1438768285,
									"enabled": true
								},
								{
									"id": "5f6ze54f6ze54f6ze5f4ze74",
									"hash": "fe6z45f6ze5f4ez6f4ze6f54zef9c5d8",
									"key": "3fzefze987f9ze8f7ze65f4ze654fzeb0",
									"iPFilterEnabled": false,
									"description": "Blog",
									"createdAt": 1428652130,
									"updatedAt": 1428652130,
									"enabled": false
								}
							]
							

Exemple de code :

								curl -X GET -H "Content-Type: application/json" -H "X-Tipimail-ApiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/settings/apikeys
							
require 'vendor/autoload.php';

$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');

try {
	
	$result = $tipimail->getSettingsService()->getApiKeysService()->getAll();
	var_dump($result);
		
}
catch(Tipimail\Exceptions\TipimailException $e) {
	echo 'Exception received :', $e->getMessage(), "\n";
	
}