Login

This method creates a new CloudBlue Commerce session.

Input parameters:

Name Description

event

A parameter specifying the method to call. The value must be the login for this method.

login

The URL-encoded user name to create a session for.

password

The URL-encoded password for user.

secret

Your shared secret password. For more information about this feature, refer to the Managing a Shared Secret section.

logout_url

The URL to forward a user to logout or session expiration (optional).

session_id

The ID of a new session.

Note: The password and secret parameters are mutually exclusive, meaning only one of them needs to be passed to log in to CloudBlue Commerce.

Calling of this method returns the following responses:

  • HTTP Status 200 and session_id are returned if session creation succeeds.

    Note: If HTTP Status 200 is returned without any session_id, it means that a wrong secret was provided during login.

  • HTTP Status 403 is returned if session creation fails.

Examples

For passing the password parameter:

curl -k -H "Content-Type: application/x-www-form-urlencoded" -d "event=login&user=USER&password=PASSWORD&session_id=000001" -X POST https://cp.brand01.acom/servlet/Sessions

For passing the secret parameter:

curl -k -H "Content-Type: application/x-www-form-urlencoded" -d "event=login&login=LOGIN&secret=SECRET&session_id=000001" -X POST https://cp.brand01.acom/servlet/Sessions

Important: The 00001 session ID is too simple and is used in the example only for simplicity. For security reasons, you should generate high-entropy random values, for example, a 14-character random alpha-numeric string.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.