As of November 2022, Twilio no longer provides support for Authy SMS/Voice-only customers. Customers who were also using Authy TOTP or Push prior to March 1, 2023 are still supported. The Authy API is now closed to new customers and will be fully deprecated in the future.
For new development, we encourage you to use the Verify v2 API.
Existing customers will not be impacted at this time until Authy API has reached End of Life. For more information about migration, see Migrating from Authy to Verify for SMS.
The Authy Reporting API offers powerful query capability to get detailed information about your application usage. The API has three report type endpoints:
GET https://api.authy.com/protected/{FORMAT}/reporting/events
Name | Description |
---|---|
FORMAT String | The format to expect back from the REST API call. json or xml . |
Name | Description |
---|---|
query String (optional) | Query to filter list of events in response. Default is everything. See query format (📇 PII) |
page Integer (optional) | Page within paginated results to display. Default is 1. (🏢 not PII ) |
per_page Integer (optional) | Number of events to display per request. Default is 50. Maximum is 100. (🏢 not PII ) |
Response will either be in json
or xml
format depending on the format provided in the URL
Name | Description |
---|---|
success Boolean | Returns true if the request was successful. (🏢 not PII ) |
events Array | List of event objects. Each event contains the following fields:-event : name of the event.-time : time of the event in ISO8601 format.-request_id : UUID of the request.-objects : additional information about the event.See examples for more details. (📇 PII) |
Use the -g
(same as --globoff
) option to switch off the "URL globbing parser" and allow cURL to process the square brackets in the query parameters.
1curl -g \2"https://api.authy.com/protected/json/reporting/events?query[event][eq]=one_touch_request_responded&query[objects.device.s_device_type][eq]=iphone&page=1&per_page=50" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"events":[3{4"event":"one_touch_request_responded",5"time":"2019-09-13T21:51:42.262Z",6"request_id":"EB03D0F0-1234-5678-9101-F5014BD54354",7"objects":{8"app":{9"b_custom_code_allowed":false,10"b_custom_message_allowed":false,11"s_account_sid":"ACxxxxxxxxxxxxxxxxx",12"s_device_app":null,13"s_errors":"",14"s_id":"12345",15"s_name":"Demo Authy App",16"s_type":"full"17},18"device":{19"s_device_app":"authy",20"s_device_type":"iphone",21"s_errors":"",22"s_id":"107469574",23"s_ip":"IPv4_e123456789a28f09e7a02",24"s_user_agent":"Authy 22.0 rv:99 (iPhone; iOS 12.0; en_US)",25"s_version":"22.7",26"t_creation_date":"2018-10-26T17:52:14.029Z",27"t_last_used_date":"2019-09-06T05:31:24.030Z",28"t_sync_date":"2019-09-13T21:49:06.463Z"29},30"onetouch_request":{31"i_device_signing_time":0,32"i_expiration_timestamp":1568497741,33"i_seconds_to_expire":86400,34"s_device_geolocation":null,35"s_errors":"",36"s_status":"denied",37"s_uuid":"389b68e0-b89e-0137-546f-0a5fffce63e2"38},39"user":{40"as_authy_ids":[41"11123"42],43"b_banned":false,44"s_authy_id":"11123",45"s_country_code":"1",46"s_errors":"",47"s_locale":"en",48"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"49}50}51},52{53"event":"one_touch_request_responded",54"time":"2019-09-11T21:59:24.105Z",55"request_id":"70D5FCF4-1234-5678-9101-9793BF7964D2",56"objects":{57"app":{58"b_custom_code_allowed":false,59"b_custom_message_allowed":false,60"s_account_sid":"ACxxxxxxxxxxxxxxxxx",61"s_device_app":null,62"s_errors":"",63"s_id":"12345",64"s_name":"Demo Authy App",65"s_type":"full"66},67"device":{68"s_device_app":"authy",69"s_device_type":"iphone",70"s_errors":"",71"s_id":"107469574",72"s_ip":"IPv4_e123456789a28f09e7a02",73"s_user_agent":"Authy 22.0 rv:99 (iPhone; iOS 12.0; en_US)",74"s_version":"22.7",75"t_creation_date":"2018-10-26T17:52:14.029Z",76"t_last_used_date":"2019-09-06T05:31:24.030Z",77"t_sync_date":"2019-09-13T21:49:06.463Z"78},79"onetouch_request":{80"i_device_signing_time":0,81"i_expiration_timestamp":1568325203,82"i_seconds_to_expire":86400,83"s_device_geolocation":null,84"s_errors":"",85"s_status":"approved",86"s_uuid":"800a6240-b70c-0137-5285-02ad8be0ad1a"87},88"user":{89"as_authy_ids":[90"11123"91],92"b_banned":false,93"s_authy_id":"11123",94"s_country_code":"1",95"s_errors":"",96"s_locale":"en",97"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"98}99}100}101],102"success":true103}
Queries to the Events Reporting API follow the following pattern:
:query[:attribute][:operator]=:value
Report queries can be filtered by the following events:
The following events are specific to our legacy phone verification API. Please consider upgrading to Verify V2:
Queries can filter based on top level event details like name:
query[event][eq]=one_touch_request_responded
Queries can also filter based on nested parameters like device type:
query[objects.device.s_device_type][eq]=iphone
Multiple queries in one request are supported:
query[event][eq]=totp_token_sent&query[objects.user.s_locale][eq]=en
The following operators can be used to compare and filter event attributes.
Operator | Description |
---|---|
eq | Equal to |
lt | Less than |
lte | Less than or Equal to |
gt | Greater than |
gte | Greater than or Equal to |
lk | Like or similar to |
1curl -g \2"https://api.authy.com/protected/json/reporting/date_histogram?report[users_added][event][eq]=user_added&interval=month&page=1&per_page=10" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"interval":"month",3"reports":{4"users_added":[5{6"timestamp":1517443200000,7"time":"2018-02-01T00:00:00.000Z",8"count":459},10{11"timestamp":1519862400000,12"time":"2018-03-01T00:00:00.000Z",13"count":7414},15{16"timestamp":1525132800000,17"time":"2018-05-01T00:00:00.000Z",18"count":2319},20{21"timestamp":1527811200000,22"time":"2018-06-01T00:00:00.000Z",23"count":10024},25{26"timestamp":1530403200000,27"time":"2018-07-01T00:00:00.000Z",28"count":3000429},30{31"timestamp":1533081600000,32"time":"2018-08-01T00:00:00.000Z",33"count":63434},35{36"timestamp":1538352000000,37"time":"2018-10-01T00:00:00.000Z",38"count":4339},40{41"timestamp":1543622400000,42"time":"2018-12-01T00:00:00.000Z",43"count":144},45{46"timestamp":1546300800000,47"time":"2019-01-01T00:00:00.000Z",48"count":4549},50{51"timestamp":1548979200000,52"time":"2019-02-01T00:00:00.000Z",53"count":6554}55]56},57"success":true58}
The following endpoint uses the querier service to return summaries over time of the queried events.
GET https://api.authy.com/protected/{FORMAT}/reporting/date_histogram
Name | Description |
---|---|
FORMAT String | The format to expect back from the REST API call. json or xml . |
Name | Description |
---|---|
report[:report_name][:attribute][:operator] String (required) | Defines the queries to run, no reports returned if omitted. -:report_name : your name for the report summary-:attribute : See query format-:operator : See supported operators(📇 PII) |
interval String (optional) | Default is month . Allowed values are: year , quarter , month , week , day , hour , minute . interval also supports time settings like 1.5h (up to w for weeks). |
scope[:attribute][:operator] String (optional) | Defines a filter for the query. Multiple scopes are supported. For example scope[user.authy_id][eq]=123 will only return results for that user. See query format and supported operators. (📇 PII) |
page Integer (optional) | Page within paginated results to display. Default is 1. (🏢 not PII ) |
per_page Integer (optional) | Number of events to display per request. Default is 50. Maximum is 100. (🏢 not PII ) |
Response will either be in json
or xml
format depending on the format provided in the URL
Name | Description |
---|---|
success Boolean | Returns true if the request was successful. (🏢 not PII ) |
reports Array | List of report objects. Each report contains the following fields-timestamp : interval timestamp in Epoch format.-time : interval time in ISO8601 format.-count : number of times the event occurred in the interval. (🏢 not PII ) |
1curl -g \2"https://api.authy.com/protected/json/reporting/terms?field=event&scope[time][gte]=2019-01-01T00:00:00.000Z&scope[time][lt]=2020-01-01T00:00:00.000Z" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"terms":[3{4"key":"one_touch_request_responded",5"count":6676},7{8"key":"totp_token_sent",9"count":36210},11{12"key":"token_verified",13"count":16414},15{16"key":"token_invalid",17"count":15518},19{20"key":"user_added",21"count":8122},23{24"key":"user_removed",25"count":5326}27],28"success":true29}
The following endpoint groups by field
to roll-up summaries of specific attributes.
GET https://api.authy.com/protected/{FORMAT}/reporting/terms
Name | Description |
---|---|
FORMAT String | The format to expect back from the REST API call. json or xml . |
Name | Description |
---|---|
field String (required) | Defines the attribute to group by. Only one field is supported per query. Queries can group by top level event details like name (event ) or nested parameters like device type (objects.device.s_device_type ). For a list of supported events and their fields, see Supported Attributes. (📇 PII) |
size Integer (optional) | Number of terms to return. Default is 10. Maximum is 100. (🏢 not PII ) |
scope[:attribute][:operator] String (optional) | Defines a filter for the query. Multiple scopes are supported. For example scope[user.authy_id][eq]=123 will only return results for that user. See query format and supported operators. (📇 PII) |
Response will either be in json
or xml
format depending on the format provided in the URL
Seeing this error?
[globbing] bad range in column
Make sure to use the -g
(same as --globoff
) option to switch off the "URL globbing parser" and allow cURL to process the square brackets in the query parameters.
1curl -g \2"https://api.authy.com/protected/json/reporting/events?query[time][gte]=2019-12-17T00:00:00.000Z&query[time][lte]=2019-12-17T23:59:59.999Z" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"events":[3{4"event":"totp_token_sent",5"time":"2019-12-17T20:32:23.601Z",6"request_id":"foo06a5ed13a1234567890ec30458e104",7"objects":{8"app":{9"b_custom_code_allowed":false,10"b_custom_message_allowed":false,11"s_account_sid":"ACxxxxxxxxxxxxxxxxx",12"s_device_app":null,13"s_errors":"",14"s_id":"12345",15"s_name":"Demo Authy App",16"s_type":"full"17},18"user":{19"as_authy_ids":[20"11123"21],22"b_banned":false,23"s_authy_id":"11123",24"s_country_code":"1",25"s_errors":"",26"s_locale":"en",27"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"28}29}30},31{32"event":"totp_token_sent",33"time":"2019-12-17T20:27:32.189Z",34"request_id":"bar06a5ed13a1234567890ec30458e501",35"objects":{36"app":{37"b_custom_code_allowed":false,38"b_custom_message_allowed":false,39"s_account_sid":"ACxxxxxxxxxxxxxxxxx",40"s_device_app":null,41"s_errors":"",42"s_id":"12345",43"s_name":"Demo Authy App",44"s_type":"full"45},46"user":{47"as_authy_ids":[48"11123"49],50"b_banned":false,51"s_authy_id":"11123",52"s_country_code":"1",53"s_errors":"",54"s_locale":"en",55"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"56}57}58},59{60"event":"user_added",61"time":"2019-12-17T20:22:24.556Z",62"request_id":"baz06a5ed13a1234567890ec30458e501",63"objects":{64"app":{65"b_custom_code_allowed":false,66"b_custom_message_allowed":false,67"s_account_sid":"ACxxxxxxxxxxxxxxxxx",68"s_device_app":null,69"s_errors":"",70"s_id":"12345",71"s_name":"Demo Authy App",72"s_type":"full"73},74"user":{75"as_authy_ids":[76"11123"77],78"b_banned":false,79"s_authy_id":"11123",80"s_country_code":"1",81"s_errors":"",82"s_locale":"en",83"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"84}85}86}87],88"success":true89}
1curl -g \2"https://api.authy.com/protected/json/reporting/events?query[time][gte]=2019-04-01T00:00:00.000Z&query[time][lt]=2019-07-01T00:00:00.000Z&page=2&per_page=5" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"events":[3{4"event":"one_touch_request_responded",5"time":"2019-04-03T21:15:11.193Z",6"request_id":"6FCA925A-9D07-4DFE-B160-84A760A7620C",7"objects":{8"app":{9"b_custom_code_allowed":false,10"b_custom_message_allowed":false,11"s_account_sid":"ACxxxxxxxxxxxxxxxxx",12"s_device_app":null,13"s_errors":"",14"s_id":"12345",15"s_name":"Demo Authy App",16"s_type":"full"17},18"device":{19"s_device_app":"authy",20"s_device_type":"iphone",21"s_errors":"",22"s_id":"107469574",23"s_ip":"IPv4_e123456789a28f09e7a02",24"s_user_agent":"Authy 22.0 rv:99 (iPhone; iOS 12.0; en_US)",25"s_version":"22.7",26"t_creation_date":"2018-10-26T17:52:14.029Z",27"t_last_used_date":"2019-09-06T05:31:24.030Z",28"t_sync_date":"2019-09-13T21:49:06.463Z"29},30"onetouch_request":{31"i_device_signing_time":0,32"i_expiration_timestamp":1568497741,33"i_seconds_to_expire":86400,34"s_device_geolocation":null,35"s_errors":"",36"s_status":"denied",37"s_uuid":"389b68e0-b89e-0137-546f-0a5fffce63e2"38},39"user":{40"as_authy_ids":[41"11123"42],43"b_banned":false,44"s_authy_id":"11123",45"s_country_code":"1",46"s_errors":"",47"s_locale":"en",48"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"49}50}51},52{53"event":"one_touch_request_responded",54"time":"2019-04-03T21:14:16.777Z",55"request_id":"859CA085-6353-4925-AD69-911CB1256BCA",56"objects":{57"app":{58"b_custom_code_allowed":false,59"b_custom_message_allowed":false,60"s_account_sid":"ACxxxxxxxxxxxxxxxxx",61"s_device_app":null,62"s_errors":"",63"s_id":"12345",64"s_name":"Demo Authy App",65"s_type":"full"66},67"device":{68"s_device_app":"authy",69"s_device_type":"iphone",70"s_errors":"",71"s_id":"107469574",72"s_ip":"IPv4_e123456789a28f09e7a02",73"s_user_agent":"Authy 22.0 rv:99 (iPhone; iOS 12.0; en_US)",74"s_version":"22.7",75"t_creation_date":"2018-10-26T17:52:14.029Z",76"t_last_used_date":"2019-09-06T05:31:24.030Z",77"t_sync_date":"2019-09-13T21:49:06.463Z"78},79"onetouch_request":{80"i_device_signing_time":0,81"i_expiration_timestamp":1568497741,82"i_seconds_to_expire":86400,83"s_device_geolocation":null,84"s_errors":"",85"s_status":"denied",86"s_uuid":"389b68e0-b89e-0137-546f-0a5fffce63e2"87},88"user":{89"as_authy_ids":[90"11123"91],92"b_banned":false,93"s_authy_id":"11123",94"s_country_code":"1",95"s_errors":"",96"s_locale":"en",97"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"98}99}100},101{102"event":"token_verified",103"time":"2019-04-03T19:58:41.978Z",104"request_id":"b058ce28cfddcbadeabda9a10f93f6a6",105"objects":{106"app":{107"b_custom_code_allowed":false,108"b_custom_message_allowed":false,109"s_account_sid":"ACxxxxxxxxxxxxxxxxx",110"s_device_app":null,111"s_errors":"",112"s_id":"12345",113"s_name":"Demo Authy App",114"s_type":"full"115},116"token":{117"s_id":"75512345",118"s_type":"SmsToken"119},120"user":{121"as_authy_ids":[122"11123"123],124"b_banned":false,125"s_authy_id":"11123",126"s_country_code":"1",127"s_errors":"",128"s_locale":"en",129"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"130}131}132},133{134"event":"totp_token_sent",135"time":"2019-04-03T19:58:29.403Z",136"request_id":"3dbcc130b48294c7abb1ef94dfbb2710",137"objects":{138"app":{139"b_custom_code_allowed":false,140"b_custom_message_allowed":false,141"s_account_sid":"ACxxxxxxxxxxxxxxxxx",142"s_device_app":null,143"s_errors":"",144"s_id":"12345",145"s_name":"Demo Authy App",146"s_type":"full"147},148"user":{149"as_authy_ids":[150"11123"151],152"b_banned":false,153"s_authy_id":"11123",154"s_country_code":"1",155"s_errors":"",156"s_locale":"en",157"s_phone_number":"ce65dc3e20xxxxxxxxxxxxxxxxc56ddee10071"158}159}160},161{162"event":"too_many_code_verifications",163"time":"2019-03-19T21:15:33.2Z",164"request_id":"44f1a17d42bb458bd4c74928fc20b445",165"objects":{166"app":{167"b_custom_code_allowed":false,168"b_custom_message_allowed":false,169"s_account_sid":"ACxxxxxxxxxxxxxxxxx",170"s_device_app":null,171"s_errors":"",172"s_id":"12345",173"s_name":"Demo Authy App",174"s_type":"full"175}176}177}178],179"success":true180}
1curl -g \2"https://api.authy.com/protected/json/reporting/date_histogram?interval=month&report[verified_tokens][event][eq]=token_verified&report[invalid_tokens][event][eq]=token_invalid" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"interval":"month",3"reports":{4"invalid_tokens":[5{6"timestamp":1517443200000,7"time":"2018-02-01T00:00:00.000Z",8"count":09},10{11"timestamp":1519862400000,12"time":"2018-03-01T00:00:00.000Z",13"count":414},15{16"timestamp":1525132800000,17"time":"2018-05-01T00:00:00.000Z",18"count":019},20{21"timestamp":1527811200000,22"time":"2018-06-01T00:00:00.000Z",23"count":024},25{26"timestamp":1530403200000,27"time":"2018-07-01T00:00:00.000Z",28"count":029},30{31"timestamp":1533081600000,32"time":"2018-08-01T00:00:00.000Z",33"count":234},35{36"timestamp":1538352000000,37"time":"2018-10-01T00:00:00.000Z",38"count":139},40{41"timestamp":1543622400000,42"time":"2018-12-01T00:00:00.000Z",43"count":044},45{46"timestamp":1546300800000,47"time":"2019-01-01T00:00:00.000Z",48"count":049},50{51"timestamp":1548979200000,52"time":"2019-02-01T00:00:00.000Z",53"count":354},55{56"timestamp":1551398400000,57"time":"2019-03-01T00:00:00.000Z",58"count":059},60{61"timestamp":1554076800000,62"time":"2019-04-01T00:00:00.000Z",63"count":064},65{66"timestamp":1556668800000,67"time":"2019-05-01T00:00:00.000Z",68"count":069},70{71"timestamp":1559347200000,72"time":"2019-06-01T00:00:00.000Z",73"count":074},75{76"timestamp":1567296000000,77"time":"2019-09-01T00:00:00.000Z",78"count":179},80{81"timestamp":1569888000000,82"time":"2019-10-01T00:00:00.000Z",83"count":084}85],86"verified_tokens":[87{88"timestamp":1517443200000,89"time":"2018-02-01T00:00:00.000Z",90"count":091},92{93"timestamp":1519862400000,94"time":"2018-03-01T00:00:00.000Z",95"count":796},97{98"timestamp":1525132800000,99"time":"2018-05-01T00:00:00.000Z",100"count":0101},102{103"timestamp":1527811200000,104"time":"2018-06-01T00:00:00.000Z",105"count":4106},107{108"timestamp":1530403200000,109"time":"2018-07-01T00:00:00.000Z",110"count":0111},112{113"timestamp":1533081600000,114"time":"2018-08-01T00:00:00.000Z",115"count":0116},117{118"timestamp":1538352000000,119"time":"2018-10-01T00:00:00.000Z",120"count":0121},122{123"timestamp":1543622400000,124"time":"2018-12-01T00:00:00.000Z",125"count":5126},127{128"timestamp":1546300800000,129"time":"2019-01-01T00:00:00.000Z",130"count":3131},132{133"timestamp":1548979200000,134"time":"2019-02-01T00:00:00.000Z",135"count":3136},137{138"timestamp":1551398400000,139"time":"2019-03-01T00:00:00.000Z",140"count":1141},142{143"timestamp":1554076800000,144"time":"2019-04-01T00:00:00.000Z",145"count":1146},147{148"timestamp":1556668800000,149"time":"2019-05-01T00:00:00.000Z",150"count":0151},152{153"timestamp":1559347200000,154"time":"2019-06-01T00:00:00.000Z",155"count":0156},157{158"timestamp":1567296000000,159"time":"2019-09-01T00:00:00.000Z",160"count":12161},162{163"timestamp":1569888000000,164"time":"2019-10-01T00:00:00.000Z",165"count":0166}167]168},169"success":true170}
1curl -g \2"https://api.authy.com/protected/json/reporting/date_histogram?scope[time][gte]=2019-04-01T00:00:00.000Z&scope[time][lt]=2019-07-01T00:00:00.000Z&report[verified_tokens][event][eq]=token_verified" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"interval":"month",3"reports":{4"verified_tokens":[5{6"timestamp":1554076800000,7"time":"2019-04-01T00:00:00.000Z",8"count":569},10{11"timestamp":1556668800000,12"time":"2019-05-01T00:00:00.000Z",13"count":12914},15{16"timestamp":1559347200000,17"time":"2019-06-01T00:00:00.000Z",18"count":54319}20]21},22"success":true23}
1curl -g \2"https://api.authy.com/protected/json/reporting/terms?field=objects.user.s_authy_id&scope[time][gte]=2019-11-01T00:00:00.000Z&scope[time][lt]=2019-12-01T00:00:00.000Z" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"terms":[3{4"key":"123",5"count":996},7{8"key":"321",9"count":19710},11{12"key":"452",13"count":114},15{16"key":"942",17"count":14000518},19{20"key":"23",21"count":1422{23"key":"6792",24"count":525}26],27"success":true28}
1curl -g \2"https://api.authy.com/protected/json/reporting/terms?field=objects.device.s_device_type&scope[time][gte]=2019-01-01T00:00:00.000Z&scope[time][lt]=2020-01-01T00:00:00.000Z" \3-H "X-Authy-API-Key: d57d919d11e6b221c9bf6f7c882028f9"
1{2"terms":[3{4"key":"iphone",5"count":438236},7{8"key":"android",9"count":239023510},11{12"key":"chrome",13"count":14514}15],16"success":true17}
Rate limits are enforced by the Authy API. If your application hits the rate limit, an error will be returned and the app will be temporarily suspended.
Limit | Time | Context |
---|---|---|
30 | per minute | per application |
300 | per hour | per application |