Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Connections

Connections

Establishes a connection to the Zuora REST API service based on a valid user credentials.

This call authenticates the user and returns an API session cookie that's used to authorize subsequent calls to the REST API. A call to connections is a required first step before using the Zuora REST API to access data.

The credentials must belong to a user account that has permission to access the API service.

As noted elsewhere, it's strongly recommended that an account used for Zuora API activity is never used to log into the Zuora UI.  Once an account is used to log into the UI, it may be subject to periodic forced password changes, which may eventually lead to authentication failures when using the API.

Request

  • Production: POST https://api.zuora.com/rest/v1/connections

  • API Sandbox: POST https://apisandbox-api.zuora.com/rest/v1/connections

Request header parameters

apiAccessKeyId

required

Account username

apiSecretAccessKey

required

Account password

Content-Type

required

Must be set to "application/json"

Response

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

Examples

HTTP request:

POST https://api.zuora.com/rest/v1/connections

CURL request:

##
## Connection
##
echo
echo "=========Start connect to server========="
echo
curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Accept:application/json" -X POST $BASE_URL/connections

JSON response from a successful connection:

{
  "success": true,
}

JSON response from a failed connection:

{
  "success": false,
  "reasons": [
    {
      "code": 90000011,
      "message": "this resource is protected, please sign in first"
    }
  ]
}

 

Last modified
11:27, 23 Jun 2016

Tags

Classifications

(not set)