Obtenir la liste des contacts d’un groupe
- Home
- Obtenir la liste des contacts d’un groupe
Obtenir la liste des contacts d’un groupe
URL
GET https://api.smspartner.fr/v1/contact/list
Paramètres
Chaque demande d’API prend en charge les paramètres suivants :
apiKey | Clé API de votre compte. Vous l’obtenez dans votre compte SMS Partner. |
---|---|
groupId | Identifiant du compte |
page | Numéro de page de la liste des contact, par défaut : 1
Il y a 20 contacts par page |
Requête
Exemple de requête :
1 2 3 |
<span style="font-weight: 400;">curl --location --request GET 'https://api.smspartner.fr/v</span><span style="font-weight: 400;">1</span><span style="font-weight: 400;">/contact/list?apiKey=YOUR_API_KEY&groupId=ID_GROUP' \</span> <span style="font-weight: 400;">--data-raw ''</span> |
Réponses
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
{ <span style="font-weight: 400;">"success": </span><span style="font-weight: 400;">true</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"code": </span><span style="font-weight: 400;">200</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"currentPage": </span><span style="font-weight: 400;">1</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"total": </span><span style="font-weight: 400;">"20"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"datas": [</span> <span style="font-weight: 400;">{</span> <span style="font-weight: 400;">"contactId": </span><span style="font-weight: 400;">"Identifiant du contact"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"phone": </span><span style="font-weight: 400;">"+xxxxxxxxxxx"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"firstname": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"lastname": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"url": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"shortUrl": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"date": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"custom1": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"custom2": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"custom3": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"custom4": </span><span style="font-weight: 400;">""</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"createdAt": </span><span style="font-weight: 400;">"2020-10-02T16:40:05+02:00"</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"stopSms": </span><span style="font-weight: 400;">false</span> <span style="font-weight: 400;">}</span> <span style="font-weight: 400;">],...</span> |
Erreurs
Exemple de message d’erreur :
1 2 3 4 5 |
<span style="font-weight: 400;">{</span> <span style="font-weight: 400;">"success": </span><span style="font-weight: 400;">false</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"code": </span><span style="font-weight: 400;">10</span><span style="font-weight: 400;">,</span> <span style="font-weight: 400;">"message": </span><span style="font-weight: 400;">"Clef API incorrecte"</span> <span style="font-weight: 400;">}</span> |
Code de contrôle
Code erreurs | ||
---|---|---|
1 | groupId est requis | |
10 | La Clé API est requise | |
404 | Le groupe n’existe pas |
© 2014 - 2023 NDA MEDIA. Tous droits réservés. Mentions légales