Authentication


The most basic form of authentication is to perform a user login HTTPS request and receive a session ID in the response.

Attach the session ID to the request header x-sessionid when making any request to the Nextspace API.


Login

Request body
interface IPostBody {
    // Client Account ID.
    // This is your organization's ID.
    account: string;
    // Logic can be either your User ID, username, or email address.
    login: string;
    // Your user's password.
    password: string;
}
Response
interface IResponse {
    // This is your session token.
    // Attach this to any request you make to the Nextspace API.
    ID: string;
    // User record associated with the login.
    User: {
        // The user's ID.
        ID: string;
        // The user's username.
        Login?: string;
        // The user's email address.
        Email?: string;
        // The user's full name.
        Fullname?: string;
    }
}
Javascript example

To invalidate the session ID, perform a logout HTTPS request with the session ID in the request header x-sessionid.

Logout