OAuth
The Stormz API only support OAuth v2 authentication.
We have a set of working examples using Node.js
Authorization Code Grant
See the RFC.
Node.js example here.
Get the authorization from the client
https://stormz.me/oauth/authorize
Parameters
Name | Type | Description |
---|---|---|
response_type | string | Required Value must be set to code |
client_id | string | Required the id of the application |
redirect_uri | string | The URI to redirect after authorization |
scope | string | a space separated list of scopes |
state | string |
Get the access_token
https://stormz.me/oauth/token
Parameters
Name | Type | Description |
---|---|---|
grant_type | string | Required must be set to authorization_code |
code | string | Required The authorization code received from the authorization server |
Implicit Grant
See the RFC.
Node.js example here.
It allows people to grant an access_token inside a web browser.
Get the authorization from the client
https://stormz.me/oauth/authorize
Parameters
Name | Type | Description |
---|---|---|
response_type | string | Required must be set to token |
client_id | string | Required the id of the application |
redirect_uri | string | The URI to redirect after authorization |
scope | string | a space separated list of scopes |
state | string |
Resource Owner Password Credentials Grant
See the RFC.
Node.js example here.
Parameters
Name | Type | Description |
---|---|---|
grant_type | string | Required must be set to password |
username | string | Required the email of the user |
password | string | Required the the password of the user |
scope | string | a space separated list of scopes |
https://stormz.me/oauth/token
Scopes
Name | Description |
---|---|
read | read only access to the user account |
write | write access to the user account |