Solution SMS

Bannière Découvrez Dialog, une exclusivité Primotexto qui va révolutionner votre communication par SMS !

API SMS

Intégrez Primotexto à vos applications grâce à notre puissante API SMS.

  >  
Compte  >  

Statistiques du compte



Requête à envoyer

URL

https://api.primotexto.com/v2/account/stats

HTTP METHOD

GET

HEADERS

X-Primotexto-ApiKey: YOUR_API_KEY

Retour de l'API


HEADERS

HTTP/1.1 200 OK Date: Fri, 08 Jan 2016 15:11:02 GMT Server: Apache Content-Type: application/json;charset=UTF-8 Vary: Accept-Encoding Transfer-Encoding: chunked

DATA

{ "bounces": 1247, "credits": 279, "delivered": 12484, "sent": 14925, "submitted": 14811, "undelivered": 2441, "unsubscribers": 213 }
// Download library -> https://www.primotexto.com/api/librairies/latest-php.asp require_once 'primotexto-api-php/baseManager.class.php'; // Authentication authenticationManager::setApiKey('YOUR_API_KEY'); // Account Stats accountManager::accountStats();
#!/bin/bash apiKey="YOUR_API_KEY" url="https://api.primotexto.com/v2/account/stats" curl -X GET -H "X-Primotexto-ApiKey: $apiKey" $url
// Download library -> JDK 1.5 : https://www.primotexto.com/api/librairies/latest-jdk-1.5.zip // Download library -> JDK 1.6 : https://www.primotexto.com/api/librairies/latest-jdk-1.6.zip // Download library -> JDK 1.7 : https://www.primotexto.com/api/librairies/latest-jdk-1.7.zip import com.primotexto.*; // Authentication AuthenticationManager.setApiKey("YOUR_API_KEY"); // Stats PTAccountStatsResponse response = AccountManager.accountStats(); System.out.println(response.toString());
// Download library -> .NET 4.0 : https://www.primotexto.com/api/librairies/latest-net-4.0.zip // Download library -> .NET 4.5 : https://www.primotexto.com/api/librairies/latest-net-4.5.zip using Primotexto; // Authentication AuthenticationManager.setApiKey("YOUR_API_KEY"); AccountManager.accountStats();
#!/usr/bin/env ruby require 'json' require 'rest-client' apiKey = 'YOUR_API_KEY' url = 'https://api.primotexto.com/v2/account/stats' request= RestClient.get(url, { 'X-Primotexto-ApiKey' => apiKey }) puts request
// Installation -> npm install node-rest-client var apiKey = "YOUR_API_KEY"; var url = "https://api.primotexto.com/v2/account/stats"; var Client = require('node-rest-client').Client; var client = new Client(); client.get(url, { headers: { "X-Primotexto-ApiKey": apiKey } }, function (data, response) { console.log(data); });
#!/usr/bin/env python import requests apiKey = 'YOUR_API_KEY' url = 'https://api.primotexto.com/v2/account/stats' response = requests.get(url, headers={'X-Primotexto-ApiKey': apiKey}) print response.content
#!/usr/bin/perl use REST::Client; my $apiKey = 'YOUR_API_KEY'; my $url = 'https://api.primotexto.com/v2/account/stats'; my $client = REST::Client->new(); $client->GET($url , { "X-Primotexto-ApiKey" => $apiKey }); print $client->responseContent()."\n";
myApiKey est une chaîne = "YOUR_API_KEY" myUrl est une chaîne = "https://api.primotexto.com/v2/account/stats" cMaRequete est un restRequête cMaRequete..URL = myUrl cMaRequete..Méthode = "GET" cMaRequete.Entête["X-Primotexto-ApiKey"] = myApiKey cMaReponse est un restRéponse = RESTEnvoie(cMaRequete) SI ErreurDétectée ALORS Erreur(ErreurInfo(errComplet)) SINON Info(cMaReponse..Contenu) FIN