Erreurs API

Lorsqu'une API Vonage renvoie une erreur, par exemple si votre compte n'a plus de crédit, l'API renvoie une erreur au format « RFC 7807 ».

Ce document fournit une explication sommaire de la nature du problème, des causes de son apparition et des étapes à suivre pour le résoudre. Consultez l'exemple pour voir comment est structuré un rapport d'out-of-credit.

Vous aurez sans doute intérêt à réfléchir dès le départ aux erreurs que votre application devra gérer ; cette page fournit une liste de toutes les erreurs possibles, accompagnée d'explications détaillées sur la manière de les résoudre.

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json
Content-Language: en
{
  "type": "https://example.com/Error#out-of-credit",
  "title": "You do not have enough credit",
  "detail": "Your current balance is 30, but that costs 50.",
  "instance": "<trace_id>"
}

Configuration de WhatsApp

CodeInformations
number-in-use

Description

Cannot use number because it's already in use by another deployment.

Résolution

Use the existing deployment.

invalid-json

Description

The request body did not contain valid JSON

Résolution

Send a JSON request body, including a Content-Type header of application/json

unprocessable

Description

Parameters were valid JSON but something was missing or wrongly formatted

Résolution

Fix the incorrect request parameters and try again

unprocessable-profile-update

Description

Parameters were valid JSON but something was missing or wrongly formatted

Résolution

Fix the incorrect request parameters and try again

throttled

Description

Too many requests have been made on this endpoint

Résolution

Wait a moment and try again

verification-failed

Description

Verification step failed. Either because the provided code was incorrect or because too many attempts have been made

Résolution

Try again with the correct OTP, or call resend-otp

conflict-deployment-state

Description

Deployment could not be modified because it is currently in a transitional state.

Résolution

If the deployment is transitioning into the state you want it in no action is required. If the state is DELETING, no action is required as the deployment will be deleted. Otherwise, wait for the transition to complete and try again.

conflict-resend-otp

Description

Could not resend OTP because the current state of the deployment did not allow it

Résolution

The deployment has either already finished, or is in an error state (in which case you should delete it and run it again).