TravelCaster API - Flights - GetAccessToken operation
Back to Flights home.
To connect to the API you will need a username and a password. The API provides you with two passwords, one for the development environment and one for the production one. Depending on the password you send with your credentials, you will access one environment or the other.
The GetAccessToken operation returns a token created for a specific pair of username and password, determining the environment the following operations will be performed in. This token lives for one hour and has to be included in every request you send to the API from that step on.
Request
JSON
http:///api//FlightService.json/GetAccessToken [POST]
url-encoded parameters: username (string), password (string)
WebService
http:///api//FlightService.asmx
operation: GetAccessToken
parameters: username (string), password (string)
Response
All requests return a single string with a token valid for the username and password you provided. Be sure to use the correct password according to the environment you want to use.
The token has a variable lifetime, so we recommend to implement it as described into each flow.
JSON
{'96cc36202c9c783D1'}
WebService
<string xmlns="http://api.webtravelcaster.com/services/">96cc36202c9c783D1</string>
Transaction specific codes
- 1200 - Invalid credentials
- 1201 - Invalid credentials, user does not exist
- 1210 - Session expired, get new access token
Other transaction codes
- 1000 - Unspecified error, see TransactionMessage
- 1001 - Operation has timed out, retry
Back to Flights home.