Auth

Catalog


GET O auth

Request path:

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

Request example:

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

Try

Possible Response:

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

Possible Response:

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

GET Go register

Request path:

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

Request example:

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

Try

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/AuthResult

Request example:

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

Try

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/SignInStatus

Request example:

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

Try

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 Me

Request path:

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

Request example:

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

Try

Possible Response:

{
  "value": {
    "markEmailPublic": true,
    "themeId": 0,
    "email": "an example string.",
    "enableEmailNotification": true,
    "enableEnterToSendMessage": true,
    "enableInvisiable": true,
    "listInSearchResult": true,
    "isOnline": 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": "2020-09-26T00:31:27.707565Z",
    "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 Update info

Request path:

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

Request example:

https://staging.server.kahla.app/Auth/UpdateInfo?NickName=yourNickName&Bio=yourBio&HeadIconPath=yourHeadIconPath

Request content type:

application/x-www-form-urlencoded

Form content example:

NickName=yourNickName&Bio=yourBio&HeadIconPath=yourHeadIconPath 

Request form:

Name Required Type
NickName Required Text
Bio Not required Text
HeadIconPath 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 Update client setting

Request path:

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

Request example:

https://staging.server.kahla.app/Auth/UpdateClientSetting?ThemeId=0&EnableEmailNotification=false&EnableEnterToSendMessage=false&EnableInvisiable=false&MarkEmailPublic=false&ListInSearchResult=false

Request content type:

application/x-www-form-urlencoded

Form content example:

ThemeId=0&EnableEmailNotification=false&EnableEnterToSendMessage=false&EnableInvisiable=false&MarkEmailPublic=false&ListInSearchResult=false 

Request form:

Name Required Type
ThemeId Not required Number
EnableEmailNotification Not required Boolean
EnableEnterToSendMessage Not required Boolean
EnableInvisiable Not required Boolean
MarkEmailPublic Not required Boolean
ListInSearchResult 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 Change password

Request path:

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

Request example:

https://staging.server.kahla.app/Auth/ChangePassword?OldPassword=yourOldPassword&NewPassword=yourNewPassword&RepeatPassword=yourRepeatPassword

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 Send email

Request path:

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

Request example:

https://staging.server.kahla.app/Auth/SendEmail?email=youremail

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 Init pusher

Request path:

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

Request example:

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

Try

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/LogOff

Request example:

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

Try

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!"
}