Fastly provides full featured interfaces for most of its systems in addition to their web interfaces.
There are two methods of authentication: API key and username/password.
Include the API key from your account page as a
Fastly-Key header e.g.
First post to the login endpoint with the parameters
This will return a cookie. Stash it somewhere and use it in subsequent requests.