Login User

From Creately Developer

Jump to: navigation, search

Contents

Description

This can be used to authenticate to the API based on the CT authentication approach. Using this method you can obtain a Client Session Token (CST) which can be used to access most API methods. You will need a valid Creately account credentials to use this method. See more details on Authentication


Request

Request Details

URL https://creately.com/api/auth/login
HTTP Method POST
Supported Authentication This method is used to initiate a CT Authentication
API Permissions This API call will not require any permissions
User Permissions The user needs to be a valid Creately user

Request Parameters

Parameter Description Required Default Value
usr Must be a valid Creately user account email address. Mandatory N/A
pwd The plain text password of the provided Creately account email address Mandatory N/A
returnxml A boolean value indicating "true" or "false". Specifies if response should be a XML. Response will be sent in a XML if the value is true. Response will be sent in a serial string if the value is false. Optional true


Response

Response Details

Type XML
Content A valid CST will be returned on successful response.

Response Parameters

Tag Description
success Indicates if the request was successfully processed. May have true or false
token A valid Client Session Token (CST). This can be used to access most API methods.
errorcode Will be available if the success parameter was false. Will contain a valid API Error code. Valid error codes are listed in API Error Codes
message Will be available if the success parameter was false. Will contain a string message for the error

Errors

Refer to Errors related to Auth API calls in the Error Codes
Possible Errors for Login User call are: 1003, 1011


Examples

Example 1

Request

https://creately.com/api/auth/login?usr=johndoe@achme.com&pwd=securepassword

Response

	<creately-api-response>
 		<success>true</success>
 		<token>23kj2n536gv7h6534k4kjln33lwevfg7</token>
 	</creately-api-response>

Example 2

Request

https://creately.com/api/auth/login?usr=johndoe@achme.com

Response

	<creately-api-response>
		<success>false</success>
		<errorcode>1013</errorcode>
		<message>Required parameter pwd is missing.</message>
	</creately-api-response>
Personal tools