cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/portal/login" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"portal": {
"email": "jane@example.com",
"password": "current-password"
}
}'from exsited import build_client
client = build_client()
response = client.portals.create_portal_login(
{"portal": {"email": "jane@example.com", "password": "current-password"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.portals.createPortalLogin({
portal: {email: 'jane@example.com', password: 'current-password'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->portals->createPortalLogin([
'portal' => ['email' => 'jane@example.com', 'password' => 'current-password'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.portals.portals_dto.PortalsDto.PortalLogin;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<PortalLogin> response = client.portals().createPortalLogin(
Map.of("portal", Map.of("email", "jane@example.com", "password", "current-password")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Portals.CreatePortalLoginAsync(new Dictionary<string, object?>
{
["portal"] = new Dictionary<string, object?>
{
["email"] = "jane@example.com",
["password"] = "current-password",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.portals.createPortalLogin({
'portal': {'email': 'jane@example.com', 'password': 'current-password'},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Portals().CreatePortalLogin(context.Background(), map[string]any{
"portal": map[string]any{
"email": "jane@example.com",
"password": "current-password",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"portal": {
"user": {
"email_address": "<string>",
"grant_access_portal": true,
"image_uri": "<string>",
"name": "<string>",
"portals": [
{
"account": "<string>",
"display_name": "<string>",
"uuid": "<string>"
}
],
"type": "<string>"
}
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Portal
Log in a portal user
Checks a portal user’s email and password and returns the user with the portals they can open.
POST
/
portal
/
login
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/portal/login" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"portal": {
"email": "jane@example.com",
"password": "current-password"
}
}'from exsited import build_client
client = build_client()
response = client.portals.create_portal_login(
{"portal": {"email": "jane@example.com", "password": "current-password"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.portals.createPortalLogin({
portal: {email: 'jane@example.com', password: 'current-password'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->portals->createPortalLogin([
'portal' => ['email' => 'jane@example.com', 'password' => 'current-password'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.portals.portals_dto.PortalsDto.PortalLogin;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<PortalLogin> response = client.portals().createPortalLogin(
Map.of("portal", Map.of("email", "jane@example.com", "password", "current-password")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Portals.CreatePortalLoginAsync(new Dictionary<string, object?>
{
["portal"] = new Dictionary<string, object?>
{
["email"] = "jane@example.com",
["password"] = "current-password",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.portals.createPortalLogin({
'portal': {'email': 'jane@example.com', 'password': 'current-password'},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Portals().CreatePortalLogin(context.Background(), map[string]any{
"portal": map[string]any{
"email": "jane@example.com",
"password": "current-password",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"portal": {
"user": {
"email_address": "<string>",
"grant_access_portal": true,
"image_uri": "<string>",
"name": "<string>",
"portals": [
{
"account": "<string>",
"display_name": "<string>",
"uuid": "<string>"
}
],
"type": "<string>"
}
}
}{
"object": "<string>",
"request_id": "<string>",
"status": 123,
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>"
}
]
}Send the portal user’s
email and password under portal. The response holds the user under portal, with their name, email address and a portals list naming each account they can open. A password that is not the user’s current one returns 400.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.