Connect
Submit a 2FA code
Submit an SMS / authenticator code, or signal that selfie verification has completed. A wrong code parks the attempt on wrong_2fa_code_retry so it can be re-submitted.
PUT
/
v1
/
connect
/
login
/
{attemptId}
Submit a 2FA code
curl --request PUT \
--url https://api.onlyfanskit.dev/v1/connect/login/{attemptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"selfie_verification_completed": true
}
'import requests
url = "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}"
payload = {
"code": "<string>",
"selfie_verification_completed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', selfie_verification_completed: true})
};
fetch('https://api.onlyfanskit.dev/v1/connect/login/{attemptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'selfie_verification_completed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.onlyfanskit.dev/v1/connect/login/{attemptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onlyfanskit.dev/v1/connect/login/{attemptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}"
response = http.request(request)
puts response.read_body{
"attempt_id": "<string>",
"account_id": "<string>",
"polling_url": "<string>",
"verification_page_url": "<string>",
"phone_url": "<string>",
"embed_url": "<string>",
"otp_channel": "<string>",
"email_mask": "<string>",
"next_actions": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"retryable": true,
"retryAfterSec": 123,
"upstreamCode": 123,
"upstreamMessage": "<string>"
}Authorizations
Your API key, sent as Authorization: Bearer <key>.
Path Parameters
Connect attempt id.
Response
Updated attempt state
Lifecycle state of the attempt.
Available options:
pending, awaiting_mobile_session, needs_otp, needs_app_otp, needs_email, needs_face_otp, wrong_2fa_code_retry, completed_success, completed_failed Present once state is completed_success.
⌘I
Submit a 2FA code
curl --request PUT \
--url https://api.onlyfanskit.dev/v1/connect/login/{attemptId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"selfie_verification_completed": true
}
'import requests
url = "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}"
payload = {
"code": "<string>",
"selfie_verification_completed": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', selfie_verification_completed: true})
};
fetch('https://api.onlyfanskit.dev/v1/connect/login/{attemptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'selfie_verification_completed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.onlyfanskit.dev/v1/connect/login/{attemptId}"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.onlyfanskit.dev/v1/connect/login/{attemptId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onlyfanskit.dev/v1/connect/login/{attemptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"selfie_verification_completed\": true\n}"
response = http.request(request)
puts response.read_body{
"attempt_id": "<string>",
"account_id": "<string>",
"polling_url": "<string>",
"verification_page_url": "<string>",
"phone_url": "<string>",
"embed_url": "<string>",
"otp_channel": "<string>",
"email_mask": "<string>",
"next_actions": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"retryable": true,
"retryAfterSec": 123,
"upstreamCode": 123,
"upstreamMessage": "<string>"
}