Sign app users in from your server, and exchange codes for tokens.
Every call needs the project’s API key in x-header-apikey. See Authentication. Errors use the codes in Error codes.
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/auth_code/{userId}
| Parameter |
In |
Type |
Required |
Description |
userId |
path |
string |
Yes |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/auth_code/<userId>" \
-H "x-header-apikey: $API_KEY"
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/token/accesstoken
Body
| Field |
Type |
Required |
Description |
grant_type |
authorization_code \ |
refresh_token |
Yes |
code |
string |
Yes |
|
refresh_token |
string |
Yes |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/token/accesstoken" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"grant_type":"authorization_code","code":"string","refresh_token":"string"}'
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/partner/cloud2cloud
Body
| Field |
Type |
Required |
Description |
partnerId |
string |
Yes |
|
projectId |
string |
Yes |
|
puid |
string |
Yes |
|
addUserWhenNotExisted |
boolean |
Yes |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/partner/cloud2cloud" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"partnerId":"string","projectId":"string","puid":"string","addUserWhenNotExisted":true}'
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/login
Body
| Field |
Type |
Required |
Description |
email |
string |
Yes |
|
password |
string |
Yes |
|
username |
string |
Yes |
required when needVerifyEmail in project is true |
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/login" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"email":"string","password":"string","username":"string"}'
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/verify
Body
| Field |
Type |
Required |
Description |
partnerId |
string |
No |
|
projectId |
string |
No |
|
newpassword |
string |
No |
|
code |
string |
No |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/verify" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"partnerId":"string","projectId":"string","newpassword":"string","code":"string"}'
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/signup
Body
| Field |
Type |
Required |
Description |
email |
string |
Yes |
|
password |
string |
Yes |
|
username |
string |
Yes |
required when needVerifyEmail in project is true |
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/signup" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"email":"string","password":"string","username":"string"}'
POST https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/sendemail_reset
Body
| Field |
Type |
Required |
Description |
partnerId |
string |
No |
|
projectId |
string |
No |
|
email |
string |
No |
|
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/sendemail_reset" \
-H "x-header-apikey: $API_KEY" \
-H "content-type: application/json" \
-d '{"partnerId":"string","projectId":"string","email":"string"}'