Every API method accepts _request_timeout in seconds: a positive float for
the urllib3 total timeout, or a pair of positive floats (connect, read).
This controls HTTP transport waiting, not how long the server operation may run.
It is not a wall-clock deadline for the operation or for all retries combined.
Transport timeouts raise urllib3.exceptions.TimeoutError subclasses such as
ReadTimeoutError and ConnectTimeoutError. When retries are exhausted, urllib3
can instead raise urllib3.exceptions.MaxRetryError; inspect its reason to
distinguish a timeout from other connection failures. Retry behavior depends on
the HTTP method and Configuration.retries. These are client-side exceptions,
not HTTP response statuses or SDK ApiException responses.
A timeout does not guarantee cancellation or rollback of an operation accepted by the server. For example, after a start request times out, the instance may still be starting or may already be running; the timeout alone does not establish its state or mean it was stopped or destroyed. The request might not have reached the server at all, leaving the instance off. Treat the outcome as unknown and fetch the instance's current state before deciding whether to retry. If it has since been destroyed, that lookup may return not found; the timeout itself does not prove destruction. Do not blindly repeat a state-changing request.
Catch urllib3.exceptions.TimeoutError and urllib3.exceptions.MaxRetryError
separately from the SDK ApiException. MaxRetryError is not a subclass of
TimeoutError. With
_with_http_info the same rules apply. With _without_preload_content, a read
timeout may also occur later when reading the returned response body.
All URIs are relative to https://app.corellium.com/api
| Method | HTTP request | Description |
|---|---|---|
| v3_disable_totp | POST /v3/totp/disable | Disable TOTP for this user |
| v3_enable_totp | POST /v3/totp/enable | Enable TOTP for this user |
| v3_generate_totp | POST /v3/totp/generate | Generate a TOTP secret |
LoginResult v3_disable_totp(totp_disable_body)
Disable TOTP for this user
Turns two-factor sign-in off for your account. Send your password and a current six-digit code (totpToken) from your authenticator app. On success a confirmation email is sent, signing in no longer needs a code, and the response is a fresh login result with a new session token. Returns 401 if the password or code is wrong.
- Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.login_result import LoginResult
from corellium.models.totp_disable_body import TotpDisableBody
from corellium.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
host = "https://app.corellium.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = corellium.TOTPApi(api_client)
totp_disable_body = corellium.TotpDisableBody() # TotpDisableBody |
try:
# Disable TOTP for this user
api_response = api_instance.v3_disable_totp(totp_disable_body)
print("The response of TOTPApi->v3_disable_totp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TOTPApi->v3_disable_totp: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| totp_disable_body | TotpDisableBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | TOTP disabled. | - |
| 400 | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - |
| 401 | Invalid login token, password, or TOTP token. | - |
| 403 | Multi-factor authentication is not licensed for this deployment. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoginResult v3_enable_totp(totp_enable_body)
Enable TOTP for this user
Step 2 of turning on two-factor sign-in. Send the secret from v3GenerateTotp, the current six-digit code (totpToken) the authenticator app shows for it, and your account password. If the password is right and the code matches, two-factor sign-in is turned on and a confirmation email is sent.
From then on, signing in with a username and password also needs totpToken (see v3AuthLogin). The response is a fresh login result with a new session token; use it for later requests. Returns 401 if the password or code is wrong; generate a new code and retry.
- Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.login_result import LoginResult
from corellium.models.totp_enable_body import TotpEnableBody
from corellium.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
host = "https://app.corellium.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = corellium.TOTPApi(api_client)
totp_enable_body = corellium.TotpEnableBody() # TotpEnableBody |
try:
# Enable TOTP for this user
api_response = api_instance.v3_enable_totp(totp_enable_body)
print("The response of TOTPApi->v3_enable_totp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TOTPApi->v3_enable_totp: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| totp_enable_body | TotpEnableBody |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | TOTP enabled. | - |
| 400 | The request was invalid, for example a missing or malformed field. The body says which field; fix it before retrying. | - |
| 401 | Invalid login token, password, or TOTP token. | - |
| 403 | Multi-factor authentication is not licensed for this deployment. | - |
| 404 | User not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TotpGenerateResponse v3_generate_totp()
Generate a TOTP secret
Step 1 of turning on two-factor sign-in (TOTP: six-digit codes from an authenticator app such as Google Authenticator, 1Password or Authy). Creates a new secret and returns it both as text (secret) and as a QR code image. Show the QR code to the user to scan with their authenticator app, or let them type the secret in.
Nothing is turned on yet, and the secret is not saved: two-factor sign-in starts only after step 2, v3EnableTotp, succeeds. Keep the secret value; step 2 needs it. Calling this again creates a different secret. Returns 403 if your deployment is not licensed for two-factor sign-in.
- Bearer (JWT) Authentication (BearerAuth):
import corellium
from corellium.models.totp_generate_response import TotpGenerateResponse
from corellium.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.corellium.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = corellium.Configuration(
host = "https://app.corellium.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): BearerAuth
configuration = corellium.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with corellium.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = corellium.TOTPApi(api_client)
try:
# Generate a TOTP secret
api_response = api_instance.v3_generate_totp()
print("The response of TOTPApi->v3_generate_totp:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TOTPApi->v3_generate_totp: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Generated TOTP secret and QR code. | - |
| 400 | Invalid token format. | - |
| 401 | Invalid login token. | - |
| 403 | Multi-factor authentication is not licensed for this deployment. | - |
| 404 | User not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]