Filter results by

ARTIK Cloud Accounts

ARTIK Cloud Accounts provides methods to manage user accounts on the ARTIK Cloud platform. Users are not "owned" by an application, but are users of the platform.

An application can register new ARTIK Cloud users using the following identity providers:

  • ARTIK Cloud Account
  • Samsung Account
  • Google Account
  • Naver Account

The information on this page shows you how to create ARTIK Cloud users by calling an API from your own server. After reviewing this documentation, you will be able to create a login experience using ARTIK Cloud Accounts and customize the CSS to fit your application design.

Sign Up

To sign up, the user needs to provide a username, full name, email, and password. The user will receive an email to activate their new ARTIK Cloud account. Once activated, the user will be able to sign into your application.

Accounts are linked by email address. For example, an ARTIK Cloud Account and a Samsung Account that use the same email address will have the same devices and applications.

For security purposes, all login forms are hosted on the ARTIK Cloud platform. This will ensure that only ARTIK Cloud can access the user's credentials. The application does not access a user's password, but will use a token, which contains the permissions granted by the user.

HIPAA Compliance

If your application needs to meet HIPAA compliance, it must restrict user registration to ARTIK Cloud Accounts.

Form Customization

You have the ability to customize the forms hosted on the ARTIK Cloud platform. blank.css provided in the sample code gives an example of form customization.

Forms may be customized only if the application sign-up or sign-in uses the ARTIKCLOUD account type.

The following screenshots are examples of forms you can customize:

Example signup form Example signin form Example password recovery form

HTML Structure of Account Forms

To help you customize the pages, the forms follow a standard structure, shown below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
...
<body class="page-signin">
<div class="container">
    <div class="headers">
        <div class="heading-title">
            <h2 id="default-title">Sign In</h2>
            <h2 id="application-title"></h2>
        </div>
        <div class="heading-description">
            <div id="default-description"></div>
            <div id="application-description"></div>
        </div>
    </div>
    <div class="content">
        <div class="side-panel">
            <ul...>
            </ul>
        </div>
        <div class="account-form">
            [<div class="global alert alert-warning">...</div>]
            <form ... id="signin" class="account-form">
                [<div class="global alert alert-danger">...</div>]
                [<div class="flash-error alert alert-danger">...</div>]
                <div class="form-inputs">
                    <div class="form-group"></div>
                    ...
                </div>
                <div class="actions">
                    <... class="signin-action">...</...>
                    <... class="signup-action">...</...>
                    <... class="forgotpassword-action">...</...>
                    ...
                </div>
            </form>
        </div>
    </div>
    <div class="footer">
        [<div class="alert alert-info"><form ... id="resendActivationForm">...</form></div>]
        ...
    </div>
</div>
</body>
</html>

The following style changes can be made to the forms:

  • Add background image.
  • Modify fonts and colors for all forms.
  • Change button properties.
  • Customize messages for all forms, which include forgot passwords, reset password, sign-in and sign-up content.

Test the CSS

To test your CSS, make the following change to any Accounts API calls that display a form: Append the query parameter test_css_blank and make the parameter equal to true.

This will cause forms to be rendered with an empty blank.css style. You may then add your own CSS locally. Then, use a browser extension or your browser's developer tools to view the changes. For example, in Chrome you can use:

  1. Live CSS Editor: This Chrome extension allows you to live-edit a CSS file that is added when rendering a URL locally.
  2. Chrome Developer tools: You can use the “Workspaces” in Chrome to override the blank.css file with your own local CSS file. Please refer to the Chrome Workspaces documentation for more information.

Upload the CSS

Since the form is hosted on the ARTIK Cloud platform, it must be submitted to our team. To submit your form, go to the Accounts CSS page for your application on the Developer Dashboard, paste or upload your CSS, and click "Save and Publish". The response time is within one business day.

ARTIK Cloud Developer Dashboard CSS upload

Accounts API reference

Endpoint

1
https://accounts.artik.cloud

See Redirect URL parameters for redirect URL query parameters and their possible values.

Sign up a user

GET /signup

Displays a signup form. Your application uses this call to create a new user account using ARTIK Cloud Accounts or Samsung Accounts.

Available URL query parameters

Parameter Description
client_id Application ID.
account_type (Optional) Account type. Can be ARTIKCLOUD or SAMSUNG (defaults to ARTIKCLOUD).
redirect_uri (Optional) Redirect URI. If not specified, user will be redirected to an ARTIK Cloud page stating that a validation email was sent.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

The following password limitations apply:

  • Minimum length - 8 characters
  • Maximum length - 64 characters
  • At least one uppercase
  • At least one lowercase
  • At least one numeric character
  • At least one special character (~!@#$%^&*():?<>+)

When signup is successful, the user is given this message:

1
2
3
Thank you for registering.

To activate your account, please click the link in the activation email sent to your email address.

When finished:

  • User is redirected to redirect_uri with status=login_request and origin=signup.

Email confirmation from ARTIK Cloud

If signup is successful, the following email is sent from noreply@artik.cloud:

1
2
3
4
5
6
7
8
9
10
11
Signin to <app>: activate your ARTIK Cloud account
 
Dear <name>,
 
You have successfully signed up to <app> using an ARTIK Cloud account.
 
To activate your account click on the link below
<link>
 
Thanks,
<App> and ARTIK Cloud Team

Example form

Example signup form

Resend activation to a user

POST /resendActivation

Resends the activation email to a user, if the user exists.

Available URL query parameters

Parameter Description
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
client_id Application ID.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

Request body parameters

Parameter Description
email User's email address.

When finished:

  • If no redirect_uri specified: User is redirected to an ARTIK Cloud page with success or error.
  • If redirect_uri specified: User is redirected to redirect_uri with status=login_request and origin=resendactivation. On error, include form error parameters.

Sign in a user

GET /signin GET /authorize

Displays a sign-in form that allows the user to sign in (with ARTIK Cloud Accounts or other identity providers) and return a token to the application.

Using the /signin endpoint, the sign-in form is always displayed. Using the /authorize endpoint, if the user is already connected (using a session cookie), the sign-in form is skipped and the user is redirected to the OAuth2 flow.

Available URL query parameters

Parameter Description
client_id Application ID.
response_type OAuth2 response type.
account_type (Optional) Account type. Can be ARTIKCLOUD, SAMSUNG, GOOGLE or NAVER (defaults to ARTIKCLOUD).
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
scope (Optional) OAuth2 scope.
test_css_blank Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • If the user is connecting to the application for the first time, or if the application changed the permissions: The user is redirected to the grant permissions page, and the application is then redirected to the OAuth2 flow to receive a token.
  • For subsequent connections: Application is redirected to the OAuth2 flow to receive a token.
  • On error, redirect_uri includes OAuth 2 error parameter.

Example form

Example signin form

Reset a user's password

GET /forgotPassword

Displays a password reset form that allows a user to enter their email. If the user exists, an email is sent with a link to reset the user's password.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=forgotpassword.

Example form

Example password reset form

Change a user's email

GET /changeEmail

Displays a form that allows a user to change the email address associated with their account.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=changeemail.

Change a user's password

GET /changePassword

Displays a form that allows a user to change the password for their account.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=changepassword.

Sign out a user

POST /signout

Signs out a user from the current session (ARTIK Cloud, Samsung, Google, or Naver).

Available URL query parameters

Parameter Description
redirect_uri Redirect URI. If not specified, uses redirect URI of the application.

When finished:

  • User is redirected to redirect_uri with status=logout and origin=signout.

Redirect URL parameters

Query Parameter Description Possible Values
status Defines what the application should display after the request Signup, Resend Activation: login_request
Display a sign-in form for user to validate their account and return a token to the application

Signout: logout
After signout is finished and user has been logged out
origin Indicates which initial request redirected the user to the redirect URL

Exception: Signin does not return an origin because it follows the OAuth2 standard, which has no origin parameter
Signup: signup

Reset Password: forgotpassword

Resend Activation: resendactivation

Change Email: changeemail

Change Password: changepassword

Signout: signout

OAuth 2

Query Parameter Description Possible Values
error OAuth2 standard errors (see RFC-6749) Signin: unauthorized_client, invalid_request, access_denied, server_error
code OAuth2 standard code Signin: Code to be exchanged with token during OAuth2 flow
state State forwarded during OAuth2 flow Signin: state sent in request

Form errors

Query Parameter Description Possible Values
error_code Form error Resend Activation: 400
error_msg_email Form error Resend Activation:
"Maximum length is 255", "This field is required", "Valid email required"
error_msg_client_id Form error Resend Activation:
"Maximum length is 255"

Sample Code

Sample code demonstrating the above features in a Node.js application is available on GitHub. Follow the instructions in README.md to install the application.

The application is a small web server that provides OAuth2 flow and REST communication with ARTIK Cloud. It will demonstrate how to sign in/sign up/sign out a user and reset the user's password. An example using an iframe for sign-in is also provided.