### Install CH340 Driver on Windows Source: https://phoneblock.net/phoneblock/dongle Download and install the CH340 driver on Windows if the dongle is not recognized. No restart is required after installation. ```bash CH341SER.EXE ``` -------------------------------- ### Get Registration Info Source: https://phoneblock.net/phoneblock/api Retrieves information required to start a user registration. ```APIDOC ## GET /register ### Description Retrieve information required to start a user registration. ### Method GET ### Endpoint /register ``` -------------------------------- ### Dongle Installer Unsupported Message Source: https://phoneblock.net/phoneblock/link/translations/zh-Hans/dongle This JavaScript code checks if the Web Serial API is available in the browser. If not, it displays an 'unsupported' message element. This is used for the dongle installer. ```javascript oneblock.net/dongle/installer/esp-web-tools/install-button.js" ``` -------------------------------- ### Get Whitelist Source: https://phoneblock.net/phoneblock/api Retrieves the current user's personalized whitelist. ```APIDOC ## GET /whitelist ### Description Retrieves the current user's personalized whitelist. ### Method GET ### Endpoint /whitelist ``` -------------------------------- ### Start Registration Source: https://phoneblock.net/phoneblock/api/phoneblock.json Initiates a user registration process by retrieving necessary session and captcha information. The returned session ID must be used in subsequent registration requests. ```APIDOC ## GET /register ### Description Retrieve information required to start a user registration. This endpoint starts a new registration session. The session ID must be added to all following requests during the user registration. The captcha data is a Base64 encoded image that hides a text that must be added to the registration information. ### Method GET ### Endpoint /register ### Response #### Success Response (200) - **session** (string) - The session ID for the registration process. - **captcha** (string) - Base64 encoded captcha image data. #### Response Example ```json { "session": "some_session_id", "captcha": "base64_encoded_image_data" } ``` ``` -------------------------------- ### Get Blocklist Source: https://phoneblock.net/phoneblock/api Retrieves the blocklist with optional incremental synchronization. ```APIDOC ## GET /blocklist ### Description Retrieves the blocklist with optional incremental synchronization. ### Method GET ### Endpoint /blocklist ``` -------------------------------- ### GET /register Source: https://phoneblock.net/phoneblock/api/phoneblock.json Retrieves a captcha challenge for user registration. This captcha must be solved and submitted along with other registration details. ```APIDOC ## GET /register ### Description Retrieves a captcha challenge for user registration. This captcha must be solved and submitted along with other registration details. ### Method GET ### Endpoint /register ### Response #### Success Response (200) - **session** (string) - A unique session identifier for the captcha challenge. - **captcha** (string) - A Base64 encoded image of the captcha. #### Response Example { "session": "ehWfZJpRTJ9dQLemiVgY", "captcha": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAA8CAIAAADAPzDDAAAizElEQVR4Xu3deVyN+f/w8fdpX1Ra0EYpSjEhMogosrRIoVCKbNkZ2xCyFIqsmXJJvoTQlkSy..." } ``` -------------------------------- ### Get Account Settings Source: https://phoneblock.net/phoneblock/api Retrieves the current user's account settings. ```APIDOC ## GET /account ### Description Retrieves the current user's account settings. ### Method GET ### Endpoint /account ``` -------------------------------- ### Get Rating Codes Source: https://phoneblock.net/phoneblock/api Retrieves all available rating codes. ```APIDOC ## GET /ratings ### Description Retrieve all available rating codes. ### Method GET ### Endpoint /ratings ``` -------------------------------- ### Get Blacklist Source: https://phoneblock.net/phoneblock/api Retrieves the current user's personalized blacklist. ```APIDOC ## GET /blacklist ### Description Retrieves the current user's personalized blacklist. ### Method GET ### Endpoint /blacklist ``` -------------------------------- ### GET /whitelist Source: https://phoneblock.net/phoneblock/api/phoneblock.json Retrieves the current user's personalized whitelist. This endpoint returns a list of phone numbers that the user has explicitly marked as legitimate. Numbers are added to the whitelist by rating them via the POST /api/rate endpoint. ```APIDOC ## GET /whitelist ### Description Retrieves the current user's personalized whitelist. Returns a list of phone numbers that the user has explicitly marked as legitimate (whitelist). Numbers are added to the whitelist by rating them via the POST /api/rate endpoint with the A_LEGITIMATE rating. This endpoint only retrieves the list; use the rating API to add numbers. ### Method GET ### Endpoint /whitelist ### Parameters ### Query Parameters ### Request Body ### Request Example ### Response #### Success Response (200) - **numbers** (array) - List of whitelisted phone numbers with details like phone, label, comment, rating, and creation timestamp. #### Response Example { "numbers": [ { "phone": "+491234567893", "label": "(DE) 01234 567893", "comment": "My doctor", "rating": "A_LEGITIMATE", "created": 1709913600000 }, { "phone": "+491234567894", "label": "(DE) 01234 567894", "comment": null, "rating": null, "created": 1709913600000 } ] } #### Error Response (401) - **description**: If no or invalid credentials have been provided. - **example**: "Please provide login credentials." #### Error Response (404) - **description**: User not found. - **example**: "User not found" ``` -------------------------------- ### GET /search/{num} Source: https://phoneblock.net/phoneblock/api/phoneblock.json Retrieve extensive information for the given phone number from the PhoneBlock database. This includes details like votes, ratings, and AI summaries. ```APIDOC ## GET /search/{num} ### Description Retrieve extensive information for the given phone number. ### Method GET ### Endpoint /search/{num} ### Parameters #### Path Parameters - **num** (string) - Required - Phone number to inspect #### Query Parameters - **format** (string) - Optional - The format to return. Defaults to 'json'. Allowed values: 'json', 'xml'. ### Response #### Success Response (200) - **phoneId** (string) - Unique identifier for the phone number. - **info** (object) - General information about the phone number. - **phone** (string) - The phone number. - **votes** (integer) - Number of votes. - **votesWildcard** (integer) - Number of wildcard votes. - **rating** (string) - The rating of the phone number (e.g., 'C_POLL'). - **whiteListed** (boolean) - Indicates if the number is whitelisted. - **blackListed** (boolean) - Indicates if the number is blacklisted. - **archived** (boolean) - Indicates if the number is archived. - **dateAdded** (integer) - Timestamp when the number was added. - **lastUpdate** (integer) - Timestamp of the last update. - **label** (string) - A label for the phone number. - **location** (string) - The location associated with the phone number. - **topRating** (string) - The top rating for the number (e.g., 'G_FRAUD'). - **ratings** (object) - A breakdown of ratings. - **[RatingType]** (integer) - Count for each rating type. - **searches** (array) - History of searches for this number. - **aiSummary** (string) - An AI-generated summary of the number's activity. ### Request Example ```json { "example": "{\n \"phoneId\": \"⚡0123456789\",\n \"info\": {\n \"phone\": \"+49123456789\",\n \"votes\": 42,\n \"votesWildcard\": 120,\n \"rating\": \"C_POLL\",\n \"whiteListed\": false,\n \"blackListed\": false,\n \"archived\": false,\n \"dateAdded\": 1700000000000,\n \"lastUpdate\": 1710000000000,\n \"label\": \"(DE) 0123 456789\",\n \"location\": \"Berlin\"\n },\n \"topRating\": \"G_FRAUD\",\n \"ratings\": {\n \"G_FRAUD\": 30,\n \"E_ADVERTISING\": 12\n },\n \"searches\": [0, 1, 3, 5, 2, 0, 0, 0, 0, 0, 0, 0],\n \"aiSummary\": \"Aggressive spam caller attempting fraud.\"\n}" } ``` ### Response Example ```json { "example": "{\n \"phoneId\": \"⚡0123456789\",\n \"info\": {\n \"phone\": \"+49123456789\",\n \"votes\": 42,\n \"votesWildcard\": 120,\n \"rating\": \"C_POLL\",\n \"whiteListed\": false,\n \"blackListed\": false,\n \"archived\": false,\n \"dateAdded\": 1700000000000,\n \"lastUpdate\": 1710000000000,\n \"label\": \"(DE) 0123 456789\",\n \"location\": \"Berlin\"\n },\n \"topRating\": \"G_FRAUD\",\n \"ratings\": {\n \"G_FRAUD\": 30,\n \"E_ADVERTISING\": 12\n },\n \"searches\": [0, 1, 3, 5, 2, 0, 0, 0, 0, 0, 0, 0],\n \"aiSummary\": \"Aggressive spam caller attempting fraud.\"\n}" } ``` ``` -------------------------------- ### Demonstrate Hash Computation Source: https://phoneblock.net/phoneblock/api Demonstrates hash computation for the /check API (for testing and debugging only). ```APIDOC ## GET /hash ### Description Demonstrates hash computation for the /check API (for testing and debugging only, otherwise there is no privacy benefit). ### Method GET ### Endpoint /hash ``` -------------------------------- ### POST /register Source: https://phoneblock.net/phoneblock/api/phoneblock.json Registers a new user by submitting their email address and the answer to a captcha challenge. ```APIDOC ## POST /register ### Description Registers a new user by submitting their email address and the answer to a captcha challenge. ### Method POST ### Endpoint /register ### Parameters #### Request Body - **session** (string) - Required - The session identifier obtained from the GET /register request. - **answer** (string) - Required - The user's answer to the captcha challenge. - **email** (string) - Required - The user's email address. ### Request Example { "session": "ehWfZJpRTJ9dQLemiVgY", "answer": "ABCDEFG123", "email": "whoami@company.de" } ### Response #### Success Response (200) An email containing a registration code will be sent to the provided email address. #### Response Example "An e-mail was successfully sent to the provided e-mail address. The e-mail contains a registration code, that the user must provide to the final call to the verify request to receive the login credentials." ``` -------------------------------- ### Register User Source: https://phoneblock.net/phoneblock/api Registers a new user. ```APIDOC ## POST /register ### Description Register a new user. ### Method POST ### Endpoint /register ``` -------------------------------- ### API HTML Structure Source: https://phoneblock.net/phoneblock/link/translations/zh-Hans/api This HTML snippet sets up the basic structure for the API documentation page. It includes placeholders for head content, links to Swagger UI assets, and the main section for the UI. It also includes JavaScript for API functionality and context path information. ```html