API Authentication
Introduction
Prefinery allows two forms of authentication -- both HTTP Basic Authentication as well as token-based authentication using a secret api key.
Obtaining an API Key
Log in to your Prefinery account and click the Account link in the upper right corner. Follow the instructions in the sidebar to create your unique API key.
Remember that anyone who has your API key has complete access to your account, so you'll want to guard this key just as you would your username and password. If you fear that your key has been compromised, you can easily generate a new one from within your account.
API Key (token-based) Authentication
To use this method, simply append the api_key parameter to your requests, like so
curl http://sample.prefinery.com/api/v1/betas/1/testers/1.xml?api_key=706de3ef2
HTTP Basic Authentication
To use this method, use your API key as the username and X as the password. Since lots of implementations assume a password, we'll use X as a dummy password. For example,
curl -u 706de3ef2:X http://sample.prefinery.com/api/v1/betas/1/testers/1.xml
Or, you can simply use your actual username and password. Use the above method if you are uncomfortable giving your username and password to 3rd party applications.
curl -u username:password http://sample.prefinery.com/api/v1/betas/1/testers/1.xml