Restful Apps API Authentication Documentation
Overview
The Texas Roadhouse Apps API uses OAuth 2.0 based authentication. The endpoints below facilitate authentication, authorization, and token management between the API and the client application. This document covers how to authenticate and obtain an access token, which is required to access all API endpoints.
Confidentiality Notice
This documentation contains confidential and proprietary information of Texas Roadhouse Management Corp. This information is provided solely for use by authorized partners and clients who have entered into a formal agreement with Texas Roadhouse.
Environment Base URLs
| Environment | Base URL |
|---|---|
| Development | https://appsapidev.azurewebsites.net |
| UAT/QA | https://appsapiqa.azurewebsites.net |
| Production | https://appsapiprod.azurefd.net |
Step 1 — Get Authentication Code
To use any API endpoint, a client needs an authentication code to obtain a valid token. This code is generated by the Texas Roadhouse AppDev Team and will be provided to the vendor once the project approval process is complete.
Step 2 — Exchange Auth Code for Tokens
Using the OAuth 2.0 protocol, the authentication code is exchanged at the token endpoint for an OAuth2 access token.
Endpoint
/security/v2.0/token
Request Headers
| Header | Value |
|---|---|
Content-Type |
application/json |
Request Body
{
"authCode": "xxxxxxxxxxxxxxxxxxxx"
}
Success Response
200 OK application/json
{
"access_token": "eyJhbGciOiJ...",
"token_type": "Bearer",
"issued_on": 1705334400,
"expires_in": 3600,
"expires_on": 1705338000
}
Response Fields
| Field | Type | Description |
|---|---|---|
access_token |
string | The OAuth2 access token used to authenticate API requests |
token_type |
string | Token type (typically Bearer) |
issued_on |
number | Unix timestamp when the token was issued |
expires_in |
number | Number of seconds until the token expires |
expires_on |
number | Unix timestamp when the token expires |
Step 3 — Using the Access Token
Once the client application is authenticated and has retrieved an access token, it can make requests
to authorized endpoints by including the token in the Authorization header.
Authorization Header
| Header | Value |
|---|---|
Authorization |
Bearer <access_token> |
GET Request Example
Endpoint
/Lookup/TimeZone/
Request
GET /Lookup/TimeZone/ HTTP/1.1
Host: appsapiprod.azurefd.net
Authorization: Bearer <access_token>
Response
200 OK application/json
[
{
"id": 0,
"description": "None",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
},
{
"id": 1,
"description": "Eastern",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
},
{
"id": 2,
"description": "Central",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
},
{
"id": 3,
"description": "Mountain",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
},
{
"id": 4,
"description": "Pacific",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
},
{
"id": 5,
"description": "Alaska",
"isActive": true,
"autoUpdateState": true,
"state": 2,
"errors": []
}
]
POST Request Example
Endpoint
/PQF/New/
Request
POST /PQF/New/ HTTP/1.1
Host: appsapiprod.azurefd.net
Authorization: Bearer <access_token>
Content-Type: application/json
Request Body
{
"id": null,
"fileDate": "2020-05-13T14:48:24.288Z",
"storeNumber": 1,
"numberOfDaysSettlementFailed": 5,
"terminal": "test",
"isSettledManually": true,
"numberOfDaysNotManuallySettled": 6,
"serviceNowIncidentId": "1234555",
"notes": "This is a test",
"autoUpdateState": true,
"state": 3
}
Response
200 OK application/json
[
{
"id": 5,
"fileDate": "2020-05-13T14:47:42.008Z",
"storeNumber": 1,
"numberOfDaysSettlementFailed": 5,
"terminal": "test",
"isSettledManually": true,
"numberOfDaysNotManuallySettled": 6,
"serviceNowIncidentId": "1234555",
"notes": "This is a test",
"autoUpdateState": true,
"state": 2
}
]
Support
For technical support, questions, or to request an authentication code, please contact:
Texas Roadhouse API Support