Authenticate with the API to perform requests on your account.

SessionLogin

Description

Authenticate with the API in order to perform requests on your account. Returns a SessionId which can be used to authenticate future requests for a period of 30 minutes, primarily used for storing your basket.

Parameters

string UsernameThe username associated with your account.
string PasswordThe password associated with your account.
string VKeyThe VKey for this application, multiple VKeys can be used per account and must generated from the Applications section of your account.

Request

<?xml version="1.0"?>
<NoveroRequest>
    <Request target="Auth" name="SessionLogin" id="SessionRequest">
        <Username>98765</Username>
        <Password>Password</Password>
        <VKey>adf65ab</VKey>
    </Request>
</NoveroRequest>
<?php
    require_once('TTNCApi.php');
    $Api = new TTNCApi('<username>', '<password>', '<VKey>');
?>
require TTNCApi
api = TTNCApi.new('<username>', '<password>', '<vkey>')
api = TTNCApi('<username>', '<password>', '<vkey>')
using System;
using TTNCApi;
 
class Program
{
    static void Main(string[] args)
    {
        TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
     }
}

Response

<?xml version="1.0"?>
<NoveroResponse>
    <Response target="Auth" name="SessionLogin" Code="200" RequestId="TestRequest">
        <SessionId>696dc3d523ce992bd21c028df2c79fe4</SessionId>
    </Response>
</NoveroResponse>

Using

Once you have successfully authenticated to the API a SessionId will be returned. The SessionId can optionally be used for the remainder of your session and will stay active for 30 minutes. You do not (and should not) call SessionLogin() if you are using a SessionId. You should monitor for failed authentication attempts and resend the request with a SessionLogin() if the initial request fails.

To use the SessionId on subsequent requests, prepend it directly below the initial NoveroRequest node.

<?xml version="1.0"?>
<NoveroRequest>
    <SessionId>696dc3d523ce992bd21c028df2c79fe4</SessionId>
    <Request target="..." name="..." id="...">
 
        ...
 
    </Request>
</NoveroRequest>
<?
    require_once('TTNCApi.php');
    $Api = new TTNCApi();
    $Api->UseSession($SessionId);
?>
require TTNCApi
api = TTNCApi.new();
api.usesession(sessionId)
api = TTNCApi();
api.usesession(<sessionId>)
using System;
using TTNCApi;
 
class Program
{
    static void Main(string[] args)
    {
        TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
        api.usesession(<SessionId>);
    }
}