Auth

Catalog


GET Index

Request path:

https://staging.server.kahla.app/Auth/IndexTry

Request example:

https://staging.server.kahla.app/Auth/Index

Possible Response:

{
  "wikiPath": "an example string.",
  "serverTime": "2019-11-18T21:00:45.9549631Z",
  "utcTime": "2019-11-18T21:00:45.9550025Z",
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Version

Request path:

https://staging.server.kahla.app/Auth/VersionTry

Request example:

https://staging.server.kahla.app/Auth/Version

Possible Response:

{
  "latestVersion": "an example string.",
  "latestCLIVersion": "an example string.",
  "downloadAddress": "an example string.",
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize O auth

Request path:

https://staging.server.kahla.app/Auth/OAuthTry

Request example:

https://staging.server.kahla.app/Auth/OAuth

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize Go register

Request path:

https://staging.server.kahla.app/Auth/GoRegisterTry

Request example:

https://staging.server.kahla.app/Auth/GoRegister

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Auth result

Request path:

https://staging.server.kahla.app/Auth/AuthResultTry

Request example:

https://staging.server.kahla.app/Auth/AuthResult?State=yourState&Code=0

Request arguments:

Name Required Type
State Not required Text
Code Required Number

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Sign in status

Request path:

https://staging.server.kahla.app/Auth/SignInStatusTry

Request example:

https://staging.server.kahla.app/Auth/SignInStatus

Possible Response:

{
  "value": true,
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize Me

Request path:

https://staging.server.kahla.app/Auth/MeTry

Request example:

https://staging.server.kahla.app/Auth/Me

Possible Response:

{
  "value": {
    "makeEmailPublic": true,
    "themeId": 0,
    "email": "an example string.",
    "enableEmailNotification": true,
    "enableEnterToSendMessage": true,
    "id": "an example string.",
    "bio": "an example string.",
    "nickName": "an example string.",
    "sex": "an example string.",
    "iconFilePath": "an example string.",
    "preferedLanguage": "an example string.",
    "accountCreateTime": "2019-11-18T21:00:45.9588203Z",
    "emailConfirmed": true
  },
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Update info

Request path:

https://staging.server.kahla.app/Auth/UpdateInfo

Request content type:

application/x-www-form-urlencoded

Form content example:

NickName=yourNickName&Bio=yourBio&HeadIconPath=yourHeadIconPath&HideMyEmail=false 

Request form:

Name Required Type
NickName Required Text
Bio Not required Text
HeadIconPath Required Text
HideMyEmail Required Boolean

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Update client setting

Request path:

https://staging.server.kahla.app/Auth/UpdateClientSetting

Request content type:

application/x-www-form-urlencoded

Form content example:

ThemeId=0&EnableEmailNotification=false&EnableEnterToSendMessage=false 

Request form:

Name Required Type
ThemeId Not required Number
EnableEmailNotification Not required Boolean
EnableEnterToSendMessage Not required Boolean

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Change password

Request path:

https://staging.server.kahla.app/Auth/ChangePassword

Request content type:

application/x-www-form-urlencoded

Form content example:

OldPassword=yourOldPassword&NewPassword=yourNewPassword&RepeatPassword=yourRepeatPassword 

Request form:

Name Required Type
OldPassword Required Text
NewPassword Required Text
RepeatPassword Required Text

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

POST Authorize Send email

Request path:

https://staging.server.kahla.app/Auth/SendEmail

Request content type:

application/x-www-form-urlencoded

Form content example:

email=youremail 

Request form:

Name Required Type
email Required Text

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Authorize Init pusher

Request path:

https://staging.server.kahla.app/Auth/InitPusherTry

Request example:

https://staging.server.kahla.app/Auth/InitPusher

Possible Response:

{
  "serverPath": "an example string.",
  "channelId": 0,
  "connectKey": "an example string.",
  "code": 0,
  "message": "an example string."
}

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}

GET Log off

Request path:

https://staging.server.kahla.app/Auth/LogOffTry

Request example:

https://staging.server.kahla.app/Auth/LogOff?DeviceId=0

Request arguments:

Name Required Type
DeviceId Required Number

Possible Response:

{
  "code": -1,
  "message": "Some error."
}

Possible Response:

{
  "items": [
    "Some item is invalid!"
  ],
  "code": -10,
  "message": "Your input contains several errors!"
}