Skip to content

added curl alternative code #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sections/authentication.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Example:
curl -i -X PUT -H 'Content-Type: application/xml' -u {username}:{password} -d "..." https://api.fastspring.com/...
```

For those that don't have curl available (for example asp.net mvc) you can use the "Authentication" header:
``` C#
string credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes("username:password"));
webClientInstance.Headers[HttpRequestHeader.Authorization] = string.Format("Basic {0}", credentials);
```

Company, Username, Password
---------------------------
Expand All @@ -25,4 +30,4 @@ As noted in the example, each request will require 3 key pieces of authenticatio

* `{company}` is the case sensitive Company ID which you use to login to SpringBoard.
* `{username}` is the case sensitive username of the special API user you created via SpringBoard.
* `{password}` is the case sensitive password of the API user.
* `{password}` is the case sensitive password of the API user.