Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 1.2 KB

File metadata and controls

48 lines (38 loc) · 1.2 KB
layout toc title slug
docs-api
toc-api-admin.html
POST /auth/token
url label
/docs/api/admin
admin
url label
/docs/api/admin/methods
methods
get token

Exchange credentials for access token

Headers

Header Value
Authorization Bearer [token]
Content-type application/json

Arguments

The request body must be a JSON string with the following fields:

Field Description
client_id identifies the client. Currently, must be either node-red-admin or node-red-editor.
grant_type must be password
scope a space-separated list of permissions being requested. Currently, must be either * or read.
username the username to authenticate
password the password to authenticate

Response

Status Code Reason Response
200 Success See example response body
401 Not authorized none

{% highlight json %} { "access_token": "A_SECRET_TOKEN", "expires_in":604800, "token_type": "Bearer" } {% endhighlight %}