Three Ways to Get a Code
Email and phone rentals are lent by Phones Inc, one service at a time. 2FA entries are secrets you store yourself.
Email and phone rentals must be enabled for your organization by Phones Inc. Until then Rent answers
forbidden. Contact support to enable them. 2FA entries need no setup.By Email
- Find the service’s
idwith List Services.email.availablesays how many addresses can be rented right now. - Rent an address with
type: "email". - Enter the rental’s
addressin the service’s sign-up or login form. - Call Get Rental every few seconds until
codeis set.
status becomes expired.
By SMS
The same steps withtype: "phone". The address is a phone number in international format, such as +15550100123. Check phone.available in List Services first. A phone rental lasts until its expiresAt, usually a few minutes.
With 2FA
For an account protected by an authenticator app, store the account’s 2FA secret once and ask for the current code whenever the service asks for it.- In the service’s two-factor settings, choose an authenticator app and copy the setup key (the text version of the QR code).
- Add it with
POST /v1/authenticator/add.appistiktokorinstagram;labelis your name for the account, such as its username;phoneoptionally links the entry to one of your phones. - Read the current code with
POST /v1/authenticator/codeand the entry’sid. Each code is valid until itsexpiresAt, about 30 seconds.
POST /v1/authenticator/scan does steps 1 and 2 for you: it reads the QR code off the phone’s screen and stores the entry for that phone, without the setup key ever reaching your code. See Scan 2FA QR Code.
POST /v1/authenticator (pass phone to list one phone’s entries), change label, app or phone with POST /v1/authenticator/update, and remove one with POST /v1/authenticator/delete. See List 2FA Entries, Add 2FA Entry and Get 2FA Code.