Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
API Reference
Glossary
System Notefiles
Notecard API
Introduction
card Requests
dfu Requests
env Requests
file Requests
hub Requests
note Requests
ntn Requests
var Requests
web Requests
Notehub API
API Introduction
Authorization API
Generate OAuth TokenGenerate Session Token
Billing Account API
Device API
Event API
Monitor API
Project API
Route API
homechevron_rightDocschevron_rightAPI Referencechevron_rightNotehub APIchevron_rightAuthorization API - Notehub API Reference

Authorization API

The Notehub authorization API contains endpoints to generate authentication tokens for use with other Notehub API requests.

NameHTTP Request
Generate OAuth TokenPOST /oauth2/token
Generate Session Token DeprecatedPOST /auth/login

Generate OAuth Token Notehub

Generate an OAuth bearer token that can be used to authenticate subsequent Notehub API requests.

HTTP Method:POST
URL:https://api.notefile.net/oauth2/token
Arguments

grant_type

string

This argument must be set to "client_credentials".

client_id

string

The Client ID from the Programmatic API access section of a Notehub project. See here for details.

client_secret

string

The Client secret from the Programmatic API access section of a Notehub project. See here for details.

curl -X POST
 -L 'https://notehub.io/oauth2/token'
 -H 'content-type: application/x-www-form-urlencoded'
 -d grant_type=client_credentials
 -d client_id=your-client-id
 -d client_secret=your-client-secret
Response Members

access_token

string

The string OAuth bearer token. This is the value you’ll want to save for use in subsequent Notehub API requests.

expires_in

integer

The number of seconds until the access token expires.

token_type

string

The type of token returned. Currently this will always be set to "bearer".

Example Response
{
  "access_token": "abc123...",
  "expires_in": 1799,
  "token_type": "bearer"
}

Generate Session Token Notehub

deprecated

This authentication method is officially deprecated in favor of the OAuth workflow documented here.

Generate a session token that can be used to authenticate subsequent Notehub API requests.

HTTP Method:POST
URL:https://api.notefile.net/auth/login
Arguments

username

string

The email address of your Notehub account.

password

string

The password of your Notehub account.

If your account was created by using "Sign in with GitHub", by default there is no password available for API authentication purposes. Therefore, you will need to set a password in the Account settings panel in Notehub.io. This password will only be used when generating an authentication token.

curl -X POST
     -L 'https://api.notefile.net/auth/login'
     -d '{"username":"you@youremail.com", "password": "your_password"}'
import * as NotehubJs from "@blues-inc/notehub-js";

let apiInstance = new NotehubJs.AuthorizationApi();
let loginRequest = {"username":"name@example.com","password":"test-password"}; // LoginRequest | 
apiInstance.login(loginRequest).then(
  (data) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  },
  (error) => {
    console.error(error);
  }
);
import notehub_py
from notehub_py.models.login200_response import Login200Response
from notehub_py.models.login_request import LoginRequest
from notehub_py.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
    host = "https://api.notefile.net"
)

# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = notehub_py.AuthorizationApi(api_client)
    login_request = {"username":"name@example.com","password":"test-password"} # LoginRequest | 

    try:
        api_response = api_instance.login(login_request)
        print("The response of AuthorizationApi->login:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AuthorizationApi->login: %s\n" % e)
Response Members

session_token

string

The string session token. You can provide this value to subsequent Notehub API requests as an X-SESSION-TOKEN header for authentication.

Example Response
{
  "session_token": "abc123..."
}
API Introduction Billing Account API
Can we improve this page? Send us feedback
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up