Menu

Expand
Rate this page:

Export TOTP Secret Seed for Migrating to Verify TOTP

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, PHP, and Go.
  • Access via the Twilio CLI.
  • Improved visibility and insights.
  • A push authentication SDK embeddable in your own application.

You are currently viewing the Authy API. New features and development will be added only to the Verify API. Check out the FAQ for more information and the migrating to Verify guide to get started.

This API is only available for customers who intend to migrate Authy Google Auth TOTP to Verify TOTP.

By default, customers do not have access to this API endpoint. To request access, please contact support team.

Export TOTP secret seed of a user

This endpoint returns a TOTP secret seed and the otp for an authy_id. The secret seed and otp can be used to create and validate Verify TOTP factors.

GET https://api.authy.com/protected/json/users/{authy_id}/secret/export

Parameters

The X-Authy-API-Key header needs to be passed for protected endpoints.

Name Type Description
authy_id Integer Unique identifier of the user.

Response

Name Type Description
secret String Secret seed of the user.
otp String Valid OTP to verify Factor once it's created.

Status Codes

The following are the status codes supported by this API.

Code Description
200 The request has succeeded.
400 The request was invalid.
404 The resource was not found.
500 Internal Server Error.

Error codes

When the API returns a status other than 200, we add an error code in the message response body. For further information, please check the error codes page for a complete list of possible errors.

Code Description
60026 User not found.
60154 Migration tools disabled.
60003 DOS protected.

Supported response format

Currently we support only JSON format.

Example

Listing export details for user with authy_id: 1

curl -H "X-Authy-API-Key: <api_key>" \
     "https://api.authy.com/protected/json/users/1/secret/export"

Sample response

{
"secret": "ONSWG4TFORPXGZLFMQ======",
"otp": "93212"
}

Rate limits

Below are the usage limits for this API:

Scope

Limit

By user

3 per month

By app

1500 per minute



Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more