Third Party Integration
Getting started with SAMI integration
In order to integrate Medium One advanced analytics with SAMI, you will need to create 2 SAMI applications: Your primary application, and a Medium One Cloud Application that will give you access to the Advanced Analytics features.
Step 1. Create your Primary SAMI App
If you already have a SAMI Application, go directly to the next step: Create a Medium One Cloud Application.
To create your primary SAMI App:
a. Go to the SAMI developer web portal b. Sign in with your Samsung account or Sign up for an account c. Click Create application d. Fill in App Name, Description e. The Redirect URL in this SAMI App is the URL of your Web/Android/iOS App to which SAMI will redirect when the user has authenticated. f. Choose OAuth 2.0 method according to your type of application (choose implicit for client side only OAuth) g. Select Permissions required by the App: Read to read device data from SAMI, write if your App pushes data to SAMI. h. Select a or multiple Device Type to connect to.
Step 2. Create a Medium One Cloud App
The Medium One Cloud Application is used as a pass-through to read device data, apply analytical workflows, and return data for the given user. For this purpose, the user will need to also authenticate and authorize the Cloud App.
To create a Medium One Cloud Application, follow the same steps as in Step 1. with the following distinction:
a. The Callback URL must be set to:
b. The OAuth 2.0 method should be: Client Credentials, auth code
c. Permissions must be Read and Write
d. Choose the Devices you wish the Analytics App to access. Typically that would be the same devices as your own App. Make sure to select Read permission for these devices.
e. (Pending) Add the Medium One Connector to access the schema of returned data, and select Write permission.
f. Click Save Application
g. On the return page, select Show Client ID and Secret and take note of these values: they will need to be reported in your Medium One web site config.
Step 3. Connect the Cloud App to Medium One
Upon obtaining credentials for your Medium One Acccount, you will need to configure your Medium One account so it can connect to the Device data via your Medium One Cloud app.
a. Log in to your Medium One account with your username (email) and password obtained in the registration email.
b. Go to Manage Business and select My SAMI App
c. Enter your Medium One Cloud App
d. Enter your Medium One Cloud App
e. The SAMI integration Link is the link to call from your App to authenticate and authorize a user with your Medium One Cloud App.
Step 4. Authenticate a User with the Cloud App
a. Call the SAMI integration Link URL obtained from your Medium One account from your Web, iOS or Android App, or simply from your browser for testing to authorize a user.
b. Your user will be redirected to the SAMI authentication page, where the user needs to authorize access to the Cloud App.
c. The Medium One callback returns
true if the user was authenticated and authorized access, otherwise the SAMI error page with corresponding HTTP error code is returned.
Step 5. Start sending data to SAMI
a. Push data to SAMI with an authorized user from your App, and the Medium One Cloud App will automatically pull the data so it is available for processing through Analytics Workflows.