Skip to content

Instantly share code, notes, and snippets.

@SumonMSelim
Last active February 26, 2025 13:55
Show Gist options
  • Save SumonMSelim/50b380e6714860a6a8b594cfa6b1252f to your computer and use it in GitHub Desktop.
Save SumonMSelim/50b380e6714860a6a8b594cfa6b1252f to your computer and use it in GitHub Desktop.
{
    "success": true,
    "message": "User account created.",
    "data": {
        "access_token": "JWT-TOKEN",
        "token_type": "bearer",
        "expires_at": "2025-02-01 22:19:48"
        "user": {
            "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
            "email": "[email protected]",
            "first_name": "Sumon",
            "last_name": "Selim",
            "phone_number": null,
            "avatar": "https://via.placeholder.com/128x128.png?text=s",
            "roles": [],
            "permissions": [],
            "is_active": true,
            "created_at": "2025-02-01 22:19:48",
            "updated_at": "2025-02-01 22:19:48"
        }
    }
}
{
  "success": true,
  "message": "User profile loaded.",
  "data": {
    "user": {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "email": "[email protected]",
      "first_name": "Sumon",
      "last_name": "Selim",
      "phone_number": null,
      "avatar": "https://via.placeholder.com/128x128.png?text=s",
      "roles": [],
      "permissions": [],
      "is_active": true,
      "is_admin": true,
      "verified_at": "2025-02-01 22:19:48",
      "created_at": "2025-02-01 22:19:48",
      "updated_at": "2025-02-01 22:19:48"
    }
  }
}
{
    "success": false,
    "message": "Unauthenticated.",
    "error": []
}
{
    "success": false,
    "message": "The given data was invalid.",
    "error": {
        "password": [
            "The password field is required."
        ]
    }
}
{
  "success": true,
  "message": "Role loaded.",
  "data": {
    "role": {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "name": "Administrator",
      "description": "System Administrator"
      "is_active": true,
      "permissions": [],
      "created_at": "2025-02-01 22:19:48",
      "updated_at": "2025-02-01 22:19:48"
    }
  }
}
{
  "success": true,
  "message": "Permission loaded.",
  "data": {
    "role": {
      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "name": "User Management",
      "description": "Manage users, roles & permissions"
      "created_at": "2025-02-01 22:19:48",
      "updated_at": "2025-02-01 22:19:48"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment