Basic Authentication
The XAP API Platform leverages Basic Authentication to validate each API request
Why Basic Authentication?
Basic Authentication is an Internet standard (see Wikipedia entry) and if you have any experience in connecting to enterprise APIs you have probably encountered it in the past.
Keeping Your Credentials Secure
Basic Authentication is simple but effective. It is important to note that this will only be true when the credentials are kept on the server. All communication with Expedia APIs is over HTTPS which means that your authentication header information will be encrypted in transit but that will not be true if the authentication information is placed anywhere in pages or files that are downloaded to the user's browser.
Unless specifically noted in the documentation, all Expedia APIs are intended to be accessed by a server-side application and the information in the API response placed into the files downloaded to the user. Any Expedia API that is designed to be accessed directly from the client page or application will not require an authorization string.
Implementing Basic Authentication
If you have not already worked with Basic Authentication you will find that it is not very complicated. All you need is your Expedia-issued API Key (which you may have already) and an Expedia-issued password, both of which you can get from your Expedia representative.
Once you have created your authorization string you can use it in any API header where you are also using the partner key.
Note: The partner key is included twice in each header, once by itself in the Key
element, and then once more within the Base64-encoded Authorization
string. Both are required for valid API calls.