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
Parameter | Default | Description | Required/Optional |
---|---|---|---|
appId | String | Application ID of the Application that was created to access the API | Required |
appSecret | String | Application Secret. Keep this info secret because it acts as the password | Required |
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
Property | Type | Description |
---|---|---|
status | JSON Object | Indicates the status of the response |
code | Number | Status code for the response. Possible codes are: 200 – Success 400 – Bad Request 500 – Internal Server Error |
message | String | Detailed message from the server about the status |
accessToken | String | Access token for authentication. This access token is valid until the expiry time indicated in the response |
expiresIn | String | Date time when the access token will expire |