Live Chat

Live Chat

Our last tweet


didww: Planned service outage for some of Ireland DIDs.Outage Window:Wednesday 8th February 2012, 3:00am – 4:00am (GMT). Outage Duration:10 minutes

Stay Connected

Facebook Twitter Google Bookmarks RSS Feed 

How Can I Build Application for DIDWW API Using ASP.NET? How Can I Build Application for DIDWW API Using ASP.NET?


In order to build application for DIDWW API using ASP.NET you need to construct authentication string in sha1.

The following is an example for ASP.NET:


public static string GetAsHexaDecimal(byte[] bytes)
{
StringBuilder s = new StringBuilder();
int length = bytes.Length;
for (int n = 0; n <= length - 1; n++) {
s.Append(string.Format("{0,2:x}", bytes[n]).Replace(" ", "0"));
}
return s.ToString();
}

public void Page_Load(object Sender, EventArgs E)
{
string password;
password = " This e-mail address is being protected from spambots. You need JavaScript enabled to view it " + "SECURITY_KEY" + "sandbox";
SHA1Managed sha = new SHA1Managed();
ASCIIEncoding ae = new ASCIIEncoding();
byte[] data = ae.GetBytes(password);
byte[] digest = sha.ComputeHash(data);
string auth_string = GetAsHexaDecimal(digest);

didww.api.didwwapi dataAPI = new didww.api.didwwapi();
//Rest of the API code...

Where
This e-mail address is being protected from spambots. You need JavaScript enabled to view it is your username and SECURITY_KEY is your Security Key.

 

For further information please visit open.didww.com


Article is in the following categories:
KB » DID API