Click or drag to resize
AccountKey Class
The shorter of the two API access keys, the account key identifies a unique Degree API account.
Inheritance Hierarchy

Namespace: DegreeDays.Api
Assembly: DegreeDaysApi (in DegreeDaysApi.dll) Version: (
public sealed class AccountKey

The AccountKey type exposes the following members.

Public methodAccountKey
Constructs an AccountKey object using the specified string account key or throws a FormatException if the string has the wrong format.

Each API account has two access keys: an account key and a security key. The account key identifies the unique Degree API account. It is a public key in the sense that there is no need to keep it secret.

Here's an example of an account key:


Like the example above, all account keys are made up of three 4-character blocks separated by hyphens, with each non-hyphen character being one of the following:


Account keys do not contain upper-case characters or any of the following easily-confused letters and digits: 'i', 'l', 'o', '0' and '1'. The same is true of security keys (the other type of access key). The intention is to make these keys easy for non-technical users to handle (e.g. if entering them into software that you've made for them).

An AccountKey object is a wrapper around a string account key. It is useful for validating account keys from user input, since the constructor will only allow an AccountKey object to be created with a string of the correct format or a string that can be manipulated into the correct format without too much ambiguity.

Thread Safety
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
See Also