# PSN Groups Manager

Thank you for downloading **PSN Groups Manager**! This is a comprehensive desktop tool for viewing, managing, and interacting with your PlayStation Network groups (chats).

---

## ⚠️ IMPORTANT: PLEASE READ BEFORE USING!

-   **WINDOWS DEFENDER / ANTIVIRUS**: Your antivirus software may flag this application as a threat (false positive). This is common for unsigned tools that interact with online services. If you trust this application, consider adding its folder to your antivirus's exclusion list.

-   **RESPONSIBLE USE**: You are responsible for all actions performed with this tool (messages, member management, etc.). Ensure your actions comply with the PlayStation Network Terms of Service.

-   **USE AT YOUR OWN RISK**: The developer is not responsible for any issues or consequences arising from the use of this tool.

-   **NPSSO TOKEN SECURITY**: Treat your NPSSO token like a password. It is **NOT stored** by the application after it is closed.

-   **PSN API USAGE**: This tool actively interacts with PSN's APIs. Avoid performing actions (reloading, sending messages, etc.) excessively or in rapid succession to prevent potential rate-limiting on your account.

---

## ✨ MAIN FEATURES

### Viewing & Interaction

-   **Browse Groups**: Load and browse all your PSN groups.
-   **View Conversations**: Read full chat histories, with support for text, images, stickers, and video clips.
-   **Integrated Video Player**: Play video clips sent in chats directly within the application.
-   **Send Messages**: Write and send text messages.
-   **Send Images**: Attach and send images from your computer.
-   **Export Chat**: Save an entire conversation history to a text file (`.txt`).

### Group Management

-   **Create Groups**: Create a new group from scratch by searching for and inviting users.
-   **Rename Groups**: Change the name of groups (for group chats, not 1-on-1 DMs).
-   **Leave Group**: Leave a single group.
-   **Selective Purge**: Enter "Edit Mode" to select and leave multiple groups at once.

### Member Management

-   **View Members**: See a full list of group members, including avatars and their role (e.g., Owner).
-   **Add Members**: Invite new users to an existing group (subject to PSN rules, typically works for groups with 3+ members).
-   **Remove Members**: Kick users from a group (this function is only available to the group owner).
-   **Kick All**: Kick all members except the owner with a single click.

---

## 🚀 QUICK START GUIDE

### 1. Get Your NPSSO Token

-   Open your web browser and log in at: **https://my.playstation.com**
-   In a new tab of the **same browser**, navigate to: `https://ca.account.sony.com/api/v1/ssocookie`
-   You will see a response like: `{"npsso":"YOUR_64_CHARACTER_CODE_HERE"}`
-   Carefully copy **only the 64-character NPSSO token**.

### 2. Log in to the Application

-   Launch `PSN GROUPS MANAGER.exe`.
-   Paste your NPSSO token into the field at the top.
-   Click **Login**.

### 3. Use the Application

-   **Left Panel**: Your list of groups will appear here. Click a group to load it.
-   **Center Panel**: This is where you will view and interact with the selected group's conversation.
-   **Right Panel**: You will see the group's member list here, along with management buttons (Add, Remove, Export, etc.).

---

## 📁 CONFIGURATION FILE (`config.ini`)

-   A `config.ini` file will be created in the same folder as the executable.
-   You can edit this file to customize settings, such as:
    -   `show_avatars`: Show or hide user avatars (can improve performance).
    -   `max_groups_to_load`: The maximum number of groups to load.
    -   `max_messages_to_load`: The maximum number of messages to load per conversation.

---

## 🔒 DATA & PRIVACY

- Your NPSSO token is **never saved** or stored on your computer. You must enter it each time you run the application.
- The application does not store any personal information.
- At login, a simple, anonymous **ping request** is sent to the developer's website to count the number of active users. This is the **only external data sent** by the application and does not include your NPSSO, PSN ID, or any other personal data.
- Always obtain your NPSSO token directly from the official Sony URL:
  `https://ca.account.sony.com/api/v1/ssocookie`

---

**No formal support is provided.**
Use this application at your own risk. The author is not responsible for any actions taken, content sent, or their consequences.