arctos-SDK For developsarctos-SDK For develops
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
Home
Okuma
arctos
Contact
  • English
  • 繁體中文
  • Guide

    • get-started
  • Spec

    • Peer to Peer Direct
    • Relay based
  • Api

    • Overview
    • Auth
      • getAuthCode
      • getAuthTokenUseCode
      • checkAuthToken
    • Task
    • Business
    • Room
  • Peer to Peer Direct

    • overview
    • installization
    • features

      • initial_setting
      • room
      • camera
      • conference
      • microphone
      • speaker
      • share_screen
      • paint_board
      • recording
      • layout
  • Relay based

    • overview
    • installization
    • features

      • initial_setting
      • camera
      • microphone
      • speaker
      • share_screen
      • paint_board
      • share_message
      • switch_template
      • video_filters

Auth

flow_chart.png

getAuthCode

Obtain System AuthCode to get System rights token,This method can use the following parameters.

/images/skip-forward_brown.svg /api/auth/code
/images/transfers_orange.svg POST
Request:

MODERATOR example

{
    "user_id": "unique_id",
    "name":"name",
    "role":"MODERATOR"
}

PUBLISHER example

{
    "user_id": "unique_id",
    "name":"name",
    "role":"PUBLISHER"
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
Content-TypestringYapplication/json
arc-license-keykeystringY
BODY
user_idunique_id for user accountstringYPlease fill in a unique identifiable value.
namenamestringNIf a display name is not provided, a random string will be used.
example:USER-12345678
roleRole of the Logged-in UserstringYThis endpoint allows users to log in as a participant.There two roles to choose, MODERATOR or PUBLISHER ADMIN SWITCH CLIENT
Response:
{
    "status": 1,
    "message": "",
    "info": {
        "code":"XXXXXXXXXXXXXXXXXXXX"
    }
}
ParameterMeaningTypeExistedDefault valueDescription
BODY
statusresponse statusstringY0: fail
1: success
2: warning
messagemessagestringY“”Error messages should be shown when there are errors.
infoReturn Informationobject
codeUser Authentication Codestringuse this code to get token
Error code:

The following is a table of error messages returned by the API.

CodeStatusErrorMessage
2001success
0Unauthorized Access
404Resource Not Found
403Access to the requested resource is not allowed

getAuthTokenUseCode

Use getAuthCode to obtain a token. Please call getAuthTokenUseCode within ten minutes, or the code will expire.This API provides an authentication token upon successful login.

/images/skip-forward_brown.svg /api/auth/login
/images/transfers_orange.svg POST
Request:

example

{
    "grant_type":"authorization_code",
    "client_id":"arctos-webapp",
        "code":"XXXXXXXXXXX",
        "redirect_uri":"https://XXXXX.XXX.XXX"
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
Content-TypestringYapplication/json
BODY
grant_typeAuthorization Type Requested by ClientstringYThis parameter is used to specify the grant type.
client_idSource of CustomerstringYwebapp_userarctos-webapp:browser
arctos-switch:moderator_device
arctos-client:publisher_device
codeaccountstringYPlease fill in a unique identifiable value.
redirect_uristringNThe page that will be returned
Response:
{
    "status": 1,
    "message": "",
    "info": {
        "user_id": 1010000010,
        "access_token": "eyJ0eXAiOiJKV1QiLCXXXXXXXXX"
    }
}
ParameterMeaningTypeExistedDefault valueDescription
BODY
statusresponse statusstringY0: fail
1: success
2: warning
messagemessagestringY“”Error messages should be shown when there are errors.
infoReturn Informationobject
user_iduserID in ihhnumberY
access_tokenUser Authentication TokenstringY
Error code:

The following is a table of error messages returned by the API.

CodeStatusErrorMessage
2001success
0Unauthorized Access
404Resource Not Found
403Access to the requested resource is not allowed

checkAuthToken

Verify and check if the user's access_token authorization is valid.

/images/skip-forward_brown.svg /api/auth/verify
/images/transfers_orange.svg POST
Request:

example

{
    
}
ParameterMeaningTypeRequiredDefault valueDescription
HEADERS
Content-TypestringYapplication/json
AuthorizationstringYBearer
BODY
Response:
{
    "status": 1,
    "message": "",
    "info": {
        // decode from token
        "client_id": "arctos-switch",
        "user_id": 1010000006,
            "role": "SWITCH"
    }
}
ParameterMeaningTypeExistedDefault valueDescription
BODY
statusresponse statusstringY0: fail
1: success
2: warning
messagemessagestringY“”Error messages should be shown when there are errors.
infoReturn Informationobject
client_idUser’s jwt client_idstringY“”
user_idUser’s jwt user_idstringY“”
roleUser’s jwt rolestringY“GUSET”
license_roomnumberY
license_pathstringY
Error code:

The following is a table of error messages returned by the API.

CodeStatusErrorMessage
2001success
0Unauthorized Access
4011401Authorization is null
1402Authorization type is incorrect
1403Unauthorized
1404Token has expired
1405Token is invalid
404Resource Not Found
4033401License file is not found
3402License file type is incorrect
3403Unauthorized
3404License has expired
3405License room out of limit

Prev
Overview
Next
Task