Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.48 KB

admins-logout.md

File metadata and controls

59 lines (42 loc) · 1.48 KB

Admins Logout

adminsLogout := client.AdminsLogout()

Class Name

AdminsLogout

Logout

Logout

Logout(
    ctx context.Context) (
    models.ApiResponse[models.ResponseLogout],
    error)

Response Type

models.ResponseLogout

Example Usage

ctx := context.Background()

apiResponse, err := adminsLogout.Logout(ctx)
if err != nil {
    log.Fatalln(err)
} else {
    // Printing the result and response
    fmt.Println(apiResponse.Data)
    fmt.Println(apiResponse.Response.StatusCode)
}

Example Response (as JSON)

{
  "forward_url": "https://my.sso/custom_logout_url"
}

Errors

HTTP Status Code Error Description Exception Class
400 Bad Syntax ResponseHttp400Exception
401 Unauthorized ResponseHttp401ErrorException
403 Permission Denied ResponseHttp403ErrorException
404 Not found. The API endpoint doesn’t exist or resource doesn’ t exist ResponseHttp404Exception
429 Too Many Request. The API Token used for the request reached the 5000 API Calls per hour threshold ResponseHttp429ErrorException