1

Im trying to create an applet in IFTTT however i need to obtain an auth token to allow the lights to call the service each time.

Im trying to obtain an auth token via the below:

Account information

GET Request auth token https://environexus-us-oem-autha1.mios.com/autha/auth/username/{{user}}?SHA1Password={{sha1-password}}&PK_Oem=6&TokenVersion=2

The Nero API is RESTful and stateless and therefore requires authentication tokens to accompany every request. Once these tokens are requested they can be stored in a database for quick reuse.

This is the intial request to the API servers that collects the tokens and various IDs required for all subsequent calls. Tokens are valid 24 hours but should always be checked against the response in case this changes.

Request

  • {{user}} is the portal login

  • {{sha1-password}} is the hash of: sha1(lowercase({username}).{password}.oZ7QE6LcLJp6fiWzdqZc) (concatenated together - no additional characters should be inserted, salt at end is static for all accounts)

PK_Oem and TokenVersion are static and provided above.

However im not sure what to put in for the "sha1-password"section.

Any help would be appreciated?

Soumya Kanti
  • 1,429
  • 1
  • 17
  • 28
NewbAPIer
  • 11
  • 2

1 Answers1

0

You need to calculate the SHA1 hash for the information above, which is the username, password and 'static salt' concatenated together with each value separated by a period.

Don't know what language you are using but most languages have libraries that will do this for you (e.g. Apache Commons library for Java)

This API is not particularly well designed in this respect, as client side hashing does not bring any benefits (when transmitting over HTTPS) and the 'static salt' as they call it is utterly pointless, as it's public.