$ curl -X POST https://cloud.logintc.com/api/users \
-d '{"username" : "john.doe", "name" : "John Doe", "email" : "john.doe@example.com"}' \
-H 'Authorization: LoginTC key="YOUR_API_KEY"'
{
"id" : "8c184f495a5b7b6e9ed732f2ce3c67e310806f38",
"username" : "john.doe",
"name" : "John Doe",
"email" : "john.doe@example.com",
"domains" : []
}
<?php
// Get the library from github.com/logintc/logintc-php
require_once('logintc-php/LoginTC.php');
// Your API Key from cloud.logintc.com/panel/settings
$api_key = 'YOUR_API_KEY';
$logintc = new LoginTC($api_key);
// User details
$username = 'john.doe';
$name = 'John Doe';
$email = 'john.doe@example.com';
// Helper function to create user
$user = $logintc->createUser($username, $name, $email);
echo $user->getId();
# Get the library from github.com/logintc/logintc-python
import logintc
# Your API Key from cloud.logintc.com/panel/settings
api_key = 'YOUR_API_KEY'
client = logintc.LoginTC(api_key)
# User details
username = 'john.doe'
email = 'john.doe@example.com'
name = 'John Doe'
# Helper function to create user
user = client.create_user(username, email, name)
print user['id']
// Get the library from github.com/logintc/logintc-java
import com.cyphercor.logintc.LoginTC;
import com.cyphercor.logintc.LoginTC.LoginTCException;
import com.cyphercor.logintc.resource.User;
public class Example {
// Your API Key from cloud.logintc.com/panel/settings
public static final String API_KEY = "YOUR_API_KEY";
public static void main(String[] args) throws LoginTCException {
LoginTC logintc = new LoginTC(API_KEY);
// User details
String username = "john.doe";
String email = "john.doe@example.com";
String name = "John Doe";
// Helper function to create user
User user = logintc.createUser(username, email, name);
System.out.println(user.getId());
}
}