# Log In KaraboAI

To access and interact with Karabo.AI's API, an active subscription is required. Holding a subscription grants your account an API access token, which is crucial for programmatic engagement with the platform. This token is necessary for authentication, allowing you to fully utilize the API's capabilities.

Logging in to Karabo.AI is a two step process:

  1. Step 1: Submit your email
  2. Step 2: Submit Verification Code

# Step 1: Submit Your Email

Endpoint: POST https://karabo.ai/api/v1.0/get-login-token/ Alongside your email address, kindly provide a return URL. This URL will serve as a fallback in case your API access lacks a valid subscription, necessitating redirection to a payment page. The redirect URL will be forwarded to the payment processor to guide users to a designated page following successful or unsuccessful payments.

Request body:

{
  "email_address": "jonsnow@gmail.com",
  "return_url": "https://karabo.ai"
}

Success response:

{
  "response": "A verification code has been sent to your email address, please use the verify_get_login_token to verify the code and receive your login token."
}

# Step 2: Submit Verification Code

After receiving the code from step one above, using this endpoint to verify:

Endpoint: POST https://karabo.ai/api/v1.0/verify-get-login-token/

Request body:

{
  "email_address": "jonsnow@gmail.com",
  "code": 12345
}

Success response:

{
  "login_token": "your-api-token-will-be-returned-here"
}

Use the API access token received above to access the API for your account.