Skip to main content

Authentication

All requests must have an authentication. See below for how to create a new Access Token. Please reach out to your Account Manager for the credentials.

Create New Access Token

This API call returns a new access token.

Endpoint

POSThttps://api1.consumerism.pressganey.com/api/service/v1/token/create
curl --location --request POST 'https://api1.consumerism.pressganey.com/api/service/v1/token/create' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'appId=123456789031' \
--data-urlencode 'appSecret=37ded64a-1460-4e32-b2fc-3e68c4abcea4'

Request Parameters

ParameterDefaultDescriptionRequired/Optional
appIdStringApplication ID of the Application that was created to access the APIRequired
appSecretStringApplication Secret. Keep this info secret because it acts as the passwordRequired

Response

The call returns a JSON object which contains an access token and its expiry time. This access token is required to retrieve data using the REST API.

Sample JSON Response

{
"accessToken": "Wz78OmgKtowHppizWjxO7mqms7+8q1QfjaQfb9WUBooVI6IZmp5V/w==",
"status": {
"message": "Success",
"code": 200
},
"expiresIn": "2014-08-22 09:11:20"
}

Response Parameters

PropertyTypeDescription
statusJSON ObjectIndicates the status of the response
codeNumberStatus code for the response. Possible codes are: 200 – Success 400 – Bad Request 500 – Internal Server Error
messageStringDetailed message from the server about the status
accessTokenStringAccess token for authentication. This access token is valid until the expiry time indicated in the response
expiresInStringDate time when the access token will expire