Endpoint

Overview

Takes a screenshot of the phone, reads the 2FA QR code on it and stores it as a new 2FA entry linked to that phone. It is the API’s version of Scan phone in the web app. Use it while the app’s “turn on two-factor authentication” screen shows its QR code. Then enter the returned code in the app to finish turning on 2FA. The setup key is read and stored by Phones Inc and never returned, so it does not pass through your code. If you already have the setup key or the otpauth:// link, use Add 2FA Entry instead. Requires an active session on the phone. Scans one phone per request. A login in several organizations, or an administrator, must select the entry’s organization with X-Phonesinc-Organization. Platforms: Android, iPhone.

Request Body

string[]
required
The one phone whose screen shows the QR code, as a list of one id.
string
The phone, instead of phoneIds. The answer’s data is then that phone’s result itself, not a list, and a failure on the phone is the request’s ok: false with the phone’s error (at the HTTP status of its code). Give phoneId or phoneIds, not both.
string
required
The app the account belongs to: tiktok or instagram.
string
required
A name for the entry, for example the account’s username. Up to 120 characters; it cannot be blank.

Response

boolean
true when the request was carried out. Check the result for how it went on the phone.
Result[]
One Result, for the phone.

Errors

Errors on the phone itself come back in its result: session_required without a session, not_found when the screen shows no 2FA QR code (nothing is stored), and the usual phone errors such as phone_offline or in_use.