Verify 2FA

PATCH User to Verify Two Factor Authentication

Previous Step: Create User and OAuth User

To verify your email, phone or other document with two-factor authentication (2FA), pass the 6 digit validation code sent to the two-factor authentication device as the mfa_answer.

2FA code expires after 15 minutes or 900 seconds.

EXAMPLE REQUEST #1

Make a request for the 2FA verification code

PATCH /v3.1/users/5c2eaec9e4cf47006728fd29 HTTP/1.1
Host: https://uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_6zZVr8biuqGkyo9IxMO5jY2QlSp0nmD4EBAgKcJW
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_TEQJHb801qI0jG7UZ2fzt9SKY5u4AWswBRmlDPO3|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
  }]
}
body = {
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
  }]
}

user.user_update(body)
const body = {
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
  }]
}

user.updateUser(body);
body = {
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
  }]
}

user.user_update(payload: body)
$body = array (
  'documents' =>
  array (
    array (
      'id' => '2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8',
      "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
    )
  )
);

$client->update_info($body);
body = `{
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111"
    }]
  }]
}`

data, err := user.Update(body)

EXAMPLE RESPONSE #1

Note that PHONE_NUMBER_2FA is SUBMITTED|REVIEWING. If you View User before submitting the correct 2FA code, it will update to SUBMITTED|MFA_PENDING.

{
    "_id": "5c2eaec9e4cf47006728fd29",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/5c2eaec9e4cf47006728fd29"
        }
    },
    "client": {
        "id": "589acd9ecb3cd400fa75ac06",
        "name": "SynapseFI"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "entity_scope": "Arts & Entertainment",
            "entity_type": "M",
            "id": "26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
            "name": "Test User",
            "permission_scope": "SEND|RECEIVE",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "160f760b57c303b473fee3f701376e12c55ea843810cf34deba8eb06f7030857",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "FACEBOOK",
                    "id": "8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "EMAIL",
                    "id": "2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "0b4d1f070acbf6b2b640dd24dcb6b1e0a5bdcabcdebeff75727ced916d06b109",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "IP",
                    "id": "28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "DATE",
                    "id": "2b52edae636ca2fbe12ab1b08a344d381dabc3d2b92844cf7a8d8b6052b26d8e",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED"
                },
                {
                    "document_type": "ADDRESS",
                    "id": "786c29f5e04e73e0eddffc2be9a31c5d86112798969feceaa2749cb1425d5d88",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED"
                },
                {
                    "document_type": "PHONE_NUMBER_2FA",
                    "id": "6de32f3fee5263baf1558758e8afc9f44284de5d31dd4056fdd0e6bd835c5a38",
                    "last_updated": 1546563606001,
                    "status": "SUBMITTED|REVIEWING"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "7cb85697d26e2c1010266fd64a22afd396167ca630a4bad21a9e8fcff865bb1c",
                    "last_updated": 1546563275725,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1546563269349,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1546563605868,
        "public_note": null,
        "supp_id": "my_user_id"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "SEND-AND-RECEIVE",
    "phone_numbers": [
        "901.111.4444"
    ],
    "photos": [],
    "refresh_token": "refresh_2SAzILKq90XN0mOhVbr7vE4R5pTQWfYktdHaleUg"
}

EXAMPLE REQUEST #2

When the user submits the 2FA code, supply it using the mfa_answer key.

PATCH /v3.1/users/5c2eaec9e4cf47006728fd29 HTTP/1.1
Host: https://uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_6zZVr8biuqGkyo9IxMO5jY2QlSp0nmD4EBAgKcJW
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_TEQJHb801qI0jG7UZ2fzt9SKY5u4AWswBRmlDPO3|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111",
      "mfa_answer":"123456"
    }]
  }]
}
body = {
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111",
      "mfa_answer":"123456"
    }]
  }]
}

user.user_update(body)
user.updateUser({
  documents: [{
    id: '<BASE_DOC_ID>',
    social_docs: [{
      id: '<SUB_DOC_ID>',
      document_value: '901.111.1111',
      document_type: 'PHONE_NUMBER_2FA',
      mfa_answer: '123456'
    }]
  }]
});
body = {
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111",
      "mfa_answer":"123456"
    }]
  }]
}

user.user_update(payload: body)
$body = array (
  'documents' =>
  array (
    array (
      'id' => '2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8',
      "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111",
      "mfa_answer":"123456"
    }]
    )
  )
);

$user = $client->update_info($body);
body = `{
  "documents":[{
    "id":"26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
    "social_docs":[{
      "document_type":"PHONE_NUMBER_2FA",
      "document_value":"901.111.1111",
      "mfa_answer":"123456"
    }]
  }]
}`

data, err := user.Update(body)

EXAMPLE RESPONSE

Once you submit the 2FA code, the document will have a status SUBMITTED|REVIEWING. When the 2FA code is successfully submitted the status will update to SUBMITTED|VALID. If the code was incorrectly submitted, it will update to SUBMITTED|INVALID. To stay updated on the status of the document, View User or subscribe to User Webhooks.

{
    "_id": "5c2eaec9e4cf47006728fd29",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/5c2eaec9e4cf47006728fd29"
        }
    },
    "client": {
        "id": "589acd9ecb3cd400fa75ac06",
        "name": "SynapseFI"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "entity_scope": "Arts & Entertainment",
            "entity_type": "M",
            "id": "26d63977a590d1794bc14ad7801cd733653db578f7450c7a283d42bac3179998",
            "name": "Test User",
            "permission_scope": "SEND|RECEIVE",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "160f760b57c303b473fee3f701376e12c55ea843810cf34deba8eb06f7030857",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "FACEBOOK",
                    "id": "8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "EMAIL",
                    "id": "2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "0b4d1f070acbf6b2b640dd24dcb6b1e0a5bdcabcdebeff75727ced916d06b109",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "IP",
                    "id": "28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "DATE",
                    "id": "2b52edae636ca2fbe12ab1b08a344d381dabc3d2b92844cf7a8d8b6052b26d8e",
                    "last_updated": 1546563608497,
                    "status": "SUBMITTED"
                },
                {
                    "document_type": "ADDRESS",
                    "id": "786c29f5e04e73e0eddffc2be9a31c5d86112798969feceaa2749cb1425d5d88",
                    "last_updated": 1546563608497,
                    "status": "SUBMITTED"
                },
                {
                    "document_type": "PHONE_NUMBER_2FA",
                    "id": "6de32f3fee5263baf1558758e8afc9f44284de5d31dd4056fdd0e6bd835c5a38",
                    "last_updated": 1546563798369,
                    "status": "SUBMITTED|REVIEWING"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "7cb85697d26e2c1010266fd64a22afd396167ca630a4bad21a9e8fcff865bb1c",
                    "last_updated": 1546563608496,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1546563269349,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1546563798273,
        "public_note": null,
        "supp_id": "my_user_id"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "SEND-AND-RECEIVE",
    "phone_numbers": [
        "901.111.4444"
    ],
    "photos": [],
    "refresh_token": "refresh_2SAzILKq90XN0mOhVbr7vE4R5pTQWfYktdHaleUg"
}