Loading....

This topic will cover:

  • Authentication to API resources.
  • Authentication to MQTT broker.

Please pay attention to the following important about the authentication method in SAM Element IoT platform:

  1. The authentication method adopts JWT (JSON Web Token) authentication. Please refer to https://jwt.io for more information about JWT format.
  2. You will need your API username and password generated on the API page in your developer account to create JWT token.
  3. There are 2 types of tokens based on their user: developer token and user token.
  4. There are 2 types of tokens based on their functionality: refresh token and access token.
  5. The life span of refresh token is 180 days.
  6. The life span of access token is 12 hours.
  7. Authentication server address is https://iot.samelement.com/auth

The figure below explain how to obtain your developer refresh token and access token:

Developer Authentication

The figure below explain how to obtain your user refresh token and access token:

User Authentication

 

Please follow the Best Practice to avoid security breach:

  1. Only when access token has been expired or near expire, use refresh token to obtain new access token.
  2. Only when refresh token has been expired or near expire, use username and password to obtain new tokens.
  3. Use developer access token to access API resources available for developers.
  4. Use user access token to access API resources available for end users.
  5. Please refer to developers API for App for complete instruction on how to use the access token for app.
  6. Please refer to developers API for Device for complete instruction on how to use the access token for device.

 

The following figure is generally used of access token. For detail please refer to the related API documentation:

Authentication to MQTT Broker and API Resources.

Last Update: August 26, 2019  

August 26, 2019   1075   SAM Element    App Development, Getting Started, IoT Devices    
Total 1 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will get a notification email when Knowledgebase answerd/updated!

+ = Verify Human or Spambot ?

Back To Top

Add A Knowledge Base Question !

You will get a notification email when Knowledgebase answerd/updated!

+ = Verify Human or Spambot ?