Skip to main content
POST
/
account
/
login
Api Login
curl --request POST \
  --url https://ctechnology.io/api/v2.2/account/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "password": "<string>",
  "origin": "<string>"
}
'
import requests

url = "https://ctechnology.io/api/v2.2/account/login"

payload = {
"email": "jsmith@example.com",
"password": "<string>",
"origin": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', password: '<string>', origin: '<string>'})
};

fetch('https://ctechnology.io/api/v2.2/account/login', 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://ctechnology.io/api/v2.2/account/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'password' => '<string>',
'origin' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://ctechnology.io/api/v2.2/account/login"

payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"origin\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

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.post("https://ctechnology.io/api/v2.2/account/login")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"origin\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://ctechnology.io/api/v2.2/account/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"origin\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "header": {
    "api_version": "<string>",
    "permission_via": [
      {
        "permission": "<string>",
        "organization_id": "<string>"
      }
    ],
    "status": "<string>",
    "message": "<string>"
  },
  "data": {
    "token": "<string>",
    "user": {
      "email": "jsmith@example.com"
    },
    "expiry": "<string>"
  }
}
{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>"
}
}
{
"header": {
"api_version": "<string>",
"status": "<string>",
"message": "<string>"
}
}

Body

application/json
email
string<email>
required

The email with which a user wants to sign up. We will send a confirmation message to this address.

Maximum string length: 254
password
string
required

The password with which the user wants to sign up.

Required string length: 8 - 64
origin
string | null

An optional organization id under which the user is logging in. Note that depending on the organization, this may redirect the login to another provider.

Response

OK

header
APIResponseHeader · object
required
data
LoginResponse · object
required