Data-API

 

Methods

The Hyves API is fully compatible with oAuth 1.0, and its specification should be used as primary and authoritative source. This document can be used as quick reference, and will explain
how specific parameters are implemented in Hyves.

  1. realm
  2. oauth_consumer_key
  3. oauth_token
  4. oauth_signature_method
  5. oauth_signature
  6. oauth_version
  7. oauth_timestamp
  8. oauth_nonce
realm

"realm" is not actually a oAuth parameter, but can be present in the Authorization header together with the oAuth headers. On the Hyves side, this parameter is ignored. Note that the oAuth specification section 9.1.1 specifies that the realm parameter should not be used in calculating the secret.

oauth_consumer_key

The Consumer Key received from Hyves. If you have not received a key, please see getting started.

oauth_token

Either a request or access token, leave empty (and assume empty token_secret) if no token is needed for the call. Supplying an invalid token, results in an error.

oauth_signature_method

Hyves supports only "HMAC-SHA1" as signature method. Make sure to use capitals.

oauth_signature

Getting the signature right can be daunting, please see our examples. Note that if the oauth_token (and as a consequence the oauth_token_secret) is empty, the key used for the HMAC should end in an &.

oauth_version

Optional, if present, should be 1.0. Note, this is the version of the oAuth specification, not to be confused with the ha_version.

oauth_timestamp

The timestamp is the POSIX time (better known as number of seconds since 1-1-1970 0:00:00 UTC, corrected for leap-seconds). We check the timestamp against our own time, and allow a deficiency of 5 minutes either way -- we are contemplating lowering this to 1 minute or even lower; "normal" systems on "normal" networks nowadays usually are sub-second synchronously, so this should not be an issue.

oauth_nonce

Per oAuth specification section 8, we enforce that each request from a certain Consumer use unique timestamp/nonce combinations. The easiest way to create a nonce is to just use a random integer 0 < x < 230 for nonce, which results in a 1/230 chance that, if two calls are made in the same second, the second call fails; you can, however, get your nonce in many other ways as well. Using an empty nonce is allowed (obviously only once per second).