IBA Mobile — Auth
8 endpoints. Server: https://api.tunnelflight.com/api
Check Username
POST /auth/signup/check-username
This endpoint allows you to check the availability of a username for signing up.
Request Body
username(string, required): The username to be checked for availability.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"username": ""
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/signup/check-username' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"username":""}'Get Security Quetions
GET /auth/account-access/security-questions
This endpoint get all security quetions list
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
nullResponses
2XX — Successful response
Try it
curl --request GET \ --url 'https://api.tunnelflight.com/api/auth/account-access/security-questions' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>'Recover Password
POST /auth/account-access/recover-password
Recover Password
This endpoint allows the user to recover their password for the account access.
Request Body
-
username(string, required): The username of the account. -
option(string, conditinally required): The recovery option chosen by the user. -
password(string, conditinally required): The new password for the account. -
passcode(string, conditinally required): The passcode for account recovery. -
answer_3(string, conditinally optional): Answer to the security question 3. -
answer_4(string, conditinally optional): Answer to the security question 4. -
answer_9(string, conditinally optional): Answer to the security question 9.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"username": "",
"option": "",
"password": "",
"passcode": "",
"answer_3": "",
"answer_4": "",
"answer_9": ""
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/account-access/recover-password' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"username":"","option":"","password":"","passcode":"","answer_3":"","answer_4":"","answer_9":""}'Recover Username
POST /auth/account-access/recover-username
The POST request to /auth/account-access/recover-username is used to initiate the process of recovering a username associated with an account. The request requires a payload with the email, phone, and passcode parameters.
Request Body
-
email(string, conditinally required): The email address associated with the account. -
phone(string, conditinally required): The phone number associated with the account. -
passcode(string, conditinally required): The passcode used for verification.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"email": "",
"phone": "",
"passcode": ""
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/account-access/recover-username' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"email":"","phone":"","passcode":""}'Signup
POST /auth/signup
Sign Up
This endpoint allows users to create a new account by providing their personal information.
Request Body
-
real_name(string, required): The real name of the user. -
email(string, required): The email address of the user. -
screen_name(string, required): The screen name or display name of the user. -
username(string, required): The username chosen by the user. -
password(string, required): The password for the account. -
tunnel(string): The tunnel information for the user. -
country(string): The country of residence for the user. -
phone(string): The phone number of the user. -
question_1(string): Security question 1 for the user. -
answer_1(string): Answer to security question 1. -
question_2(string): Security question 2 for the user. -
answer_2(string): Answer to security question 2. -
question_3(string): Security question 3 for the user. -
answer_3(string): Answer to security question 3.
Response
The response will include the status of the sign-up process and any relevant success or error messages.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"real_name": "",
"email": "",
"screen_name": "",
"username": "",
"password": "",
"tunnel": "",
"country": "",
"phone": "",
"question_1": "",
"answer_1": "",
"question_2": "",
"answer_2": "",
"question_3": "",
"answer_3": ""
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/signup' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"real_name":"","email":"","screen_name":"","username":"","password":"","tunnel":"","country":"","phone":"","question_1":"","answer_1":"","question_2":"","answer_2":"","question_3":"","answer_3":""}'login
POST /auth/login
The POST /auth/login endpoint is used to authenticate and log in a user.
Request Body
-
username(string, required): The username of the user. -
password(string, required): The password of the user. -
checkTwoFactor(boolean, required): Indicates whether two-factor authentication is enabled. -
passcodeOption(string): Option for passcode, if applicable. -
passcode(string): The passcode for two-factor authentication.
Response
The response of this request can be represented as a JSON schema:
{
"type": "object",
"properties": {
"status": {
"type": "boolean"
},
"message": {
"type": "string"
}
}
}
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"username": "",
"password": ""
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/login' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"username":"","password":""}'send verification code
POST /auth/signup/send-verification-passcode
This endpoint is used to send a verification passcode to the user’s email or phone for account profile verification.
Request Body
-
email(string, conditionally required): The email address to which the verification passcode will be sent. -
country(number, conditionally required): The country code for the phone number. -
phone(number, conditionally required): The phone number to which the verification passcode will be sent.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"email": "",
"country": 0,
"phone": 0
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/signup/send-verification-passcode' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"email":"","country":0,"phone":0}'verify verification code
POST /auth/signup/verify-verification-passcode
This endpoint is used to verify a verification passcode for a user’s profile in the account. The request should be sent as an HTTP POST to the specified URL.
Request Body
-
email (string, conditionally required): The email of the user.
-
phone (string, conditionally required): The phone number of the user.
-
country (string, conditionally required): The country of the user.
-
passcode (number, required): The verification passcode to be verified.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | yes | Bearer token. Required for every request. |
client-id | string | yes | Client identifier issued by IBA. Required for every request. |
Request body
Request body example (default)
{
"email": "",
"phone": "",
"country": "",
"passcode": 0
}Responses
2XX — Successful response
Try it
curl --request POST \ --url 'https://api.tunnelflight.com/api/auth/signup/verify-verification-passcode' \
--header 'Authorization: Bearer <token>' \
--header 'client-id: <client-id>' \
--header 'content-type: application/json' \
--data '{"email":"","phone":"","country":"","passcode":0}'