Access Tokens

Description

Access tokens are used to authenticate users using Embed Option 1 from the Next Tech content editor.

Access tokens automatically expire after 24 hours.

post
Create Token

https://api.next.tech/v1/tokens
Generate a new access token for a given user and content. If the user has loaded this content before, the access token returned will link to their current project. Otherwise, a new project will be created.
Request
Response
Query Parameters
reset
optional
boolean
If a new project should be returned instead of an existing one (if it exists).
content_id
required
string
Content identifier (from creator) Example: bef80481-0424-491f-a885-52d78a875f14
email
optional
string
User's email (to enable use via templates) Example: codey@next.tech
last_name
optional
string
User's last name (to enable use via templates) Example: Codester
first_name
optional
string
User's first name (to enable use via templates) Example Codey
user_id
required
string
Unique (and static) user identifier (used to enable persistent coding environments) Example: u333
200: OK
{
"access_token": "39242392AC5FA5173E3D87D57F71C9B7",
"expires_at": "2018-07-23T23:18:33.485Z",
"project_id": 1,
"project_uuid": "30e44804-4f80-45f4-a98d-041d3034e435"
}

post
Refresh Token

https://api.next.tech/v1/tokens/{token}/refresh
Refresh an existing access token.
Request
Response
Path Parameters
token
required
string
Access token string
200: OK
{
"access_token": "C40C42B507B68EC8CEFF2E7B1170BB48",
"expires_at": "2018-07-23T23:16:40.485Z",
"project_id": 2,
"project_uuid": "119e3fc6-5f19-4690-a345-aefdd1f34180"
}

‚Äč