Authyのリターンコードとエラーコード
For new development, we encourage you to use the Verify API instead of the Authy API. The Verify API is an evolution of the Authy API with continued support for SMS, voice, and email one-time passcodes, an improved developer experience and new features including:
- Twilio helper libraries in JavaScript, Java, C#, Python, Ruby, and PHP
- Access via the Twilio CLI
- Improved Visibility and Insights
- Push authentication SDK embeddable in your own application
You are currently viewing the Authy API. The Authy API will continue to be maintained, but any new features and development will be on the Verify API. Check out the FAQ for more information and Verify API Reference to get started.
RESTful APIとして、TwilioのAuthy APIはHTTPレスポンスとエラーコードを返します。 これは通常の振る舞いと状況に応じた例外の確認に役立ちます。
リターンコード
下記のステータス・コードが使用されます。
200
200: OK - レスポンスは正常です。 レスポンス本文にはリクエストされたデータが含まれます。
400
400: Bad Request - リクエストにエラーが発生しました。 レスポンス本文には詳細が含まれます。
401
: Unauthorized トークンが無効です。 APIキーが誤っている場合に401が生成されます。 APIキーを確認してください。
429
Too Many Requests APIの使用制限に達しました。 APIの利用制限に達した場合、429が返されます。 制限解除まで待って、再度呼び出しを試みてください。
503
: Service Unavailable HTTP 503
エラーには複数の原因の可能性があります。
- 内部Twilioエラー
- アクセス権限のないAPIを呼び出そうとしている
エラーコード
APIが200
以外のレスポンスを返すとき、メッセージBodyにエラーコードを付加します。 この表では取りうる全エラーコードを列挙、解説しています。
エラー コード | HTTPステータス | エラーメッセージ | 概要 | Category | |
---|---|---|---|---|---|
60000 | 400 | An error occurred |
エラーが正しく構成されていない場合の既定のエラーメッセージです。 |
すべて | |
60001 | 401 | Invalid API key | 指定されたAPIキーに対応するAuthyアプリケーションがありません | すべて | |
60002 | 400 | Invalid request | リクエストに無効なパラメーターまたはデータが含まれています | すべて | |
60003 | 429 | DoS protection | 指定されたエンドポイントに対して、クライアントが単位時間あたりのリクエストの最大数に達しました。 | すべて | |
60004 | 400 | Invalid parameter | 指定されたパラメーターが無効です。 | すべて | |
60005 | 400 | UTF-8 invalid | クライアントがUTF-8の無効な文字でリクエストを送信しました | すべて | |
60006 | 503 | Phone calls are not enabled on this account | アプリケーションで音声通話がオンになっていません(ダッシュボードからオンにすることができます) | TOTP | |
60007 | 503 | SMS is not enabled | アプリケーションでSMSがオンになっていません(ダッシュボードからオンにすることができます) | TOTP | |
60008 | 403 | Your account is suspended | Twilio側または内部的な理由でアカウントがサスペンドされています。 | TOTP | |
60009 | 429 | Monthly SMS limit reached | アプリケーションが月次のSMS送信制限に達しました | TOTP | |
60010 | 429 | Daily SMS limit reached | アプリケーションが日次のSMS送信制限に達しました | TOTP | |
60011 | 429 | Monthly Phone Calls limit reached | アプリケーションは月次の音声通話の制限に達しました | TOTP | |
60012 | 429 | Daily Phone Calls limit reached | アプリケーションは日次の音声通話の制限に達しました | TOTP | |
60013 | 503 | Country code is banned | 禁止された国コードのためリクエストを完了できませんでした | TOTP | |
60014 | 503 | Call was not started | 通話の発進時に発生するエラーです | TOTP | |
60015 | 503 | SMS token was not sent | SMSのTOTPが送信されない内部エラーです | TOTP | |
60016 | 401 | User doesn't exist | 指定されたユーザーIDに対応するユーザーが存在しませんでした | TOTP | |
60017 | 503 | User suspended | ユーザーがサスペンドされたためアクションを完了できませんでした | TOTP | |
60018 | 503 | User disabled | ユーザーのデバイスがサスペンドされたためアクションを完了できませんでした | TOTP | |
60019 | 401 | Token reused | 指定されたトークンは以前使用されたものであり、二度は使用出来ません | TOTP | |
60020 | 401 | Token invalid | 指定されたトークンが無効です | TOTP | |
60021 | 403 | Phone verification couldn't be created | 電話番号検証の作成時に発生するエラーです | 電話番号認証 | |
60022 | 401 | Verification code is incorrect | 不正な電話番号検証コードです | 電話番号認証 | |
60023 | 404 | Phone verification not found | 指定されたパラメーターの電話番号検証が見つかりませんでした | 電話番号認証 | |
60024 | 403 | Couldn't get phone information | 電話番号情報の取得に失敗しました | 電話番号情報 | |
60025 | 503 | Server error while querying phone information. Please try again later | 電話番号情報照会時の内部エラーです | 電話番号情報 | |
60026 | 404 | User doesn't exist | 指定されたユーザーIDに対応するユーザーが存在しませんでした | ユーザー管理 | |
60027 | 400 | User was not valid | ユーザーが無効で保存できません | ユーザー管理 | |
60028 | 403 | The user cannot be deleted | ユーザーの削除時にエラーが発生しました | ユーザー管理 | |
60029 | 403 | Activity couldn't be created | ユーザーに対するアクティビティーの作成時にエラーが発生しました | ユーザー管理 | |
60030 | 400 | You are not passing the user params correctly | ユーザーパラメーターが不正です | ユーザー管理 | |
60031 | 403 | Action not authorized | Customer has not an authorization to complete the action | ユーザー管理 | |
60032 | 400 | SMS was not found | 指定されたSMS IDでレコードが見つからなかった場合にFacebook APIによって使用されます | フィードバック | |
60033 | 400 | Phone number is invalid | 電話番号または国コードが無効です | すべて | |
60034 | 400 | Invalid registration request | 登録リクエストの作成でエラーが発生しました | Registration | |
60035 | 404 | Registration request not found | 指定されたパラメーターで登録リクエストが見つかりませんでした | Registration | |
60036 | 401 | Invalid registration PIN | 受信した登録暗証番号が不正です | Registration | |
60037 | 403 | Registration request expired | The registration request expires after 1 hour | Registration | |
60038 | 403 | Email is invalid | ユーザーが無効なメールアドレスを入力しました | TOTP | |
60042 | 400 | Either UUID or country_code and phone number are required | 電話番号検証における無効なパラメーターです | 電話番号認証 | |
60046 | 400 | Missing dashboard account ids to process | 続行するにはアカウントIDが必須です | Dashboard | |
60047 | 403 | Invalid API key.Confirm your API key by going to https://dashboard.authy.com | When a request comes with Twilio API key rather than Authy API key | TOTP | |
60049 | 404 | Onetouch Approval request not found | Onetouch Approval request not found | OneTouch | |
60050 | 404 | Onetouch Unregistered user | Application has not added a user | OneTouch | |
60051 | 404 | Onetouch device not found | User does not have onetouch device for a given application | OneTouch | |
60052 | 400 | An error ocurred sending the approval request.Internal connection error | onetouchサービスとの通信エラーです | OneTouch | |
60053 | 400 | An error ocurred sending the approval request | 承認リクエストが作成できなかった際のエラーです | OneTouch | |
60054 | 400 | An error occurred on approval request | 承認リクエストが保留中ではなく、かつ承認リクエストが受信された際のエラーです | OneTouch | |
60055 | 400 | An error occurred notifying customer | When onetouch approval request could not be notified to the user | OneTouch | |
60056 | 505 | You must use HTTPS protocol to use this API | 本番用の全リクエストはHTTPSで送信される必要があります | TOTP | |
60057 | 503 | Your account has been suspended temporarily | This is responded when a user exceeds rate limits usage | TOTP | |
60058 | 404 | Phone number not found | Phone number not found | TOTP | |
60059 | 404 | Phone number is invalid | When a phone number is not valid | TOTP | |
60060 | 503 | Your account is suspended | Twilioアカウントがサスペンドされています | 電話番号認証 | |
60061 | 503 | Your application is suspended | Your application is suspended | TOTP | |
60063 | 403 | Disallowed IP address | 公開エンドポイントとして使用に対してブロックされているIPアドレスです | TOTP | |
60066 | 403 | Error saving the callback information | コールバック情報でアプリケーション設定を更新できません | Dashboard | |
60068 | 401 | Can not update device in registration | デバイス登録でデバイスが無効であり、変更をデバイスに保存できませんでした | Registration | |
60069 | 400 | Access key can not be saved | アクセスキーの作成において、そのアクセスキーが無効です | Dashboard | |
60070 | 400 | Application was not valid | アプリケーションの作成または更新時、そのアプリケーションが有効ではありませんでした | Dashboard | |
60071 | 404 | Access key not found | Access key not found | Dashboard | |
60072 | 404 | Invalid access key | アクセスキーが不正です | Dashboard | |
60073 | 400 | Invalid application API key | アプリケーションAPIキーが不正です | Dashboard | |
60074 | 400 | Access key doesn't have enough permissions | The given access key doesn't have enough permissions to access the URL | Dashboard | |
60079 | 400 | Approval request is not pending | 承認リクエストが保留中でないため、アクションを実行できません | OneTouch | |
60080 | 400 | Approval request is invalid | 承認リクエストが無効なため保存できません | OneTouch | |
60082 | 403 | Can not send SMS to landline phone numbers | When trying to send an SMS to a landline phone number | 電話番号認証 | |
60083 | 403 | Phone number not provisioned with any carrier | 準備されていない電話番号に電話番号検証の送信を試みた際のエラーです | 電話番号認証 | |
60086 | 403 | JWT Token expired | Token expired for phone change or phone reset process | ||
60089 | 400 | Invalid query | The given query is invalid | ||
60091 | 400 | Custom message is not allowed | Trying to use a custom message when the flag is disabled | ||
60092 | 404 | Device not found | Used when deleting SDK devices, if the id is not found or the device is not SDK only | ||
60093 | 401 | An error occurred, the device was not deleted | An error occurred destroying an SDK device (this should not happen) | ||
60094 | 400 | The given interval is invalid | For the reporting API when passing an invalid interval | ||
60095 | 400 | The given report definition is invalid | For the reporting API when passing an invalid "report" param | ||
60096 | 500 | The given query failed to process | For reporting API | ||
60098 | 403 | Webhook could not be created | When an error occurs creating a webhook using the lambda function. | ||
60099 | 403 | Webhooks cannot be listed | When an error occurs listing webhooks using the lambda function. | ||
60100 | 403 | Webhook could not be deleted | When an error occurs deleting a webhook using the lambda function | ||
60101 | 400 | JWT token is invalid | When the JWT is invalid it can't be decoded | ||
60102 | 503 | An error occurred saving the certificate | An error occurs when a push certificate is being created | ||
60103 | 400 | Platform for push notification not recognized | Currently, we only support GCM and APN. Attempting to upload certs for other platforms will raise this error | ||
60104 | 400 | Invalid push certs for the platform | When the push cert is invalid (e.g. development APN cert without the sandbox flag) | ||
60108 | 400 | Channel type is not supported by the device | A valid channel is one of SMS, call, push, totp_app | ||
60109 | 404 | Authentication method not found | Authentication method not found | ||
60110 | 503 | Authentication method can not be created | Authentication method can not be created | ||
60111 | 404 | Authentication not found | Authentication not found | ||
60115 | 403 | Target number has opted out. | SMS not sent because the phone number is in the Opt-Out list for the application | ||
60116 | 400 | Given parameters do not match JWT payload | The HTTP parameters are expected to be the same as the JWT payload | ||
60118 | 403 | Code is invalid | Returned when the code verification in the new 2FA is invalid | ||
60119 | 403 | User without PII is required | Returned when the given user has PII information | ||
60120 | 429 | Too many SMS per minute | Returned when trying to send more than 3 SMS per minute to a user | ||
60121 | 403 | Invalid SMS | Returned when trying to send SMS and it is invalid | ||
60122 | 500 | QR Code generation failed | An error happened to generate the image | ||
60123 | 403 | No generic tokens enabled | The application does not have Generic Tokens enabled | ||
60124 | 404 | Account not found | Returned when the account is not found | ||
60126 | 400 | Verification code can not be sent because of delivery report error | After an HLR query, we detected we can not deliver the verification code | ||
60127 | 403 | User is going through the deletion process |
Any request depending on a user that's being deleted |
||
60128 | 400 | User was deleted |
Any request depending on a user that was deleted |
||
60131 | 401 | Unable to confirm user deletion |
Returned when trying to create a DeleteUserRequest but failed |
||
60133 | 403 | Canadian number. Further authorization required – contact our Support Team |
More information: Twilio Lookups API is Not Returning Carrier Data for Canadian Phone Numbers |
電話番号情報 | |
60134 | 500 | An error occurred deleting the certificates | While deleting or anonymizing an app we call the Notify API to delete the service and the credentials for this App | ||
60135 | 403 | User account is blocked, unblock the account to request the deletion | When requesting a self-deletion, if the account is blocked this error is shown | ||
60136 | 403 | Cannot delete this account because you previously created an Authy app. In order to continue, you first need to delete all of the Authy apps at twilio.com/console/authy | If a user owns Authy App the deletion can not start | ||
60142 | 400 | Transaction details can not have empty values | Transaction details and hidden details can not have empty values | ||
60143 | 403 | The account was already registered | The account was already registered | ||
60144 | 403 | Something went wrong while registering the account | Something went wrong while registering the account |
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。