Skip to content

Authentication

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
Terminal window
curl -X POST "https://openapi.rogo.com.vn/api/v2.0/iot-core/authen/auth_code/<userId>" \
-H "x-header-apikey: $API_KEY"
Status Meaning
201
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
Terminal window
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"}'
Status Meaning
201
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
Terminal window
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}'
Status Meaning
default
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
Terminal window
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"}'
Status Meaning
default

Verify Email OTP (password forget | sign up verify)

Section titled “Verify Email OTP (password forget | sign up verify)”
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
Terminal window
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"}'
Status Meaning
default
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
Terminal window
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"}'
Status Meaning
default
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
Terminal window
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"}'
Status Meaning
default