### PHP Example for Fetching Services Source: https://smmgen.com/api This example demonstrates how to fetch the list of available services using the SMMGEN API v2 with PHP. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```php $apiKey, 'action' => 'services' ]; // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, $apiUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Execute cURL session $response = curl_exec($ch); // Check for errors if (curl_errno($ch)) { echo 'cURL Error: ' . curl_error($ch); } else { // Decode JSON response $services = json_decode($response, true); // Display services (example: print service names) if (is_array($services)) { foreach ($services as $service) { echo "Service ID: " . $service['service'] . ", Name: " . $service['name'] . "\n"; } } else { echo "Failed to retrieve services or invalid response format."; } } // Close cURL session curl_close($ch); ?> ``` -------------------------------- ### Example Response for Services Source: https://smmgen.com/api This is an example of the JSON response format when requesting a list of services from the SMMGEN API v2. ```json [ { "service": 1, "name": "Followers", "type": "Default", "category": "First Category", "rate": "0.90", "min": "50", "max": "10000", "refill": true, "cancel": true }, { "service": 2, "name": "Comments", "type": "Custom Comments", "category": "Second Category", "rate": "8", "min": "10", "max": "1500", "refill": false, "cancel": true } ] ``` -------------------------------- ### Example Response for Order Placement Source: https://smmgen.com/api This is an example of the JSON response format when successfully placing an order using the SMMGEN API v2. ```json { "order": 23501 } ``` -------------------------------- ### Get Service List Source: https://smmgen.com/api Retrieve a list of available services from the SMMGen API. ```APIDOC ## Get Service List ### Description Retrieves a list of all available services, including their details such as ID, name, rate, and limits. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "services" ### Response #### Success Response (200) - **service** (integer) - The unique identifier for the service. - **name** (string) - The name of the service. - **type** (string) - The type of the service. - **category** (string) - The category the service belongs to. - **rate** (string) - The cost per unit of the service. - **min** (string) - The minimum quantity allowed for the service. - **max** (string) - The maximum quantity allowed for the service. - **refill** (boolean) - Indicates if the service supports refills. - **cancel** (boolean) - Indicates if the service can be canceled. ### Response Example ```json [ { "service": 1, "name": "Followers", "type": "Default", "category": "First Category", "rate": "0.90", "min": "50", "max": "10000", "refill": true, "cancel": true }, { "service": 2, "name": "Comments", "type": "Custom Comments", "category": "Second Category", "rate": "8", "min": "10", "max": "1500", "refill": false, "cancel": true } ] ``` ``` -------------------------------- ### Get User Balance Source: https://smmgen.com/api Retrieves the current user balance and currency. Requires your API key and the action 'balance'. ```json { "balance": "100.84292", "currency": "USD" } ``` -------------------------------- ### Get User Balance Source: https://smmgen.com/api Retrieves the current balance of the user's account. ```APIDOC ## Get User Balance ### Description Retrieves the current balance of the user's account. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'balance' ### Response #### Success Response (200) - **balance** (string) - The current account balance. - **currency** (string) - The currency of the balance. ### Response Example ```json { "balance": "100.84292", "currency": "USD" } ``` ``` -------------------------------- ### Get Order Status Source: https://smmgen.com/api Retrieves the status of a single order. ```APIDOC ## Get Order Status ### Description Retrieves the status of a single order. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'status' - **order** (string) - Required - Order ID ### Response #### Success Response (200) - **charge** (string) - The cost of the order. - **start_count** (string) - The initial count for the order. - **status** (string) - The current status of the order (e.g., 'Partial', 'In progress'). - **remains** (string) - The remaining count for the order. - **currency** (string) - The currency used for the charge. ### Response Example ```json { "charge": "0.27819", "start_count": "3572", "status": "Partial", "remains": "157", "currency": "USD" } ``` ``` -------------------------------- ### Get Multiple Orders Status Source: https://smmgen.com/api Retrieves the status of multiple orders. ```APIDOC ## Get Multiple Orders Status ### Description Retrieves the status of multiple orders. Up to 100 order IDs can be provided. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'status' - **orders** (string) - Required - Order IDs separated by a comma (up to 100 IDs) ### Response #### Success Response (200) Returns a JSON object where keys are order IDs and values are their status details or an error message. #### Response Example ```json { "1": { "charge": "0.27819", "start_count": "3572", "status": "Partial", "remains": "157", "currency": "USD" }, "10": { "error": "Incorrect order ID" }, "100": { "charge": "1.44219", "start_count": "234", "status": "In progress", "remains": "10", "currency": "USD" } } ``` ``` -------------------------------- ### Get Refill Status Source: https://smmgen.com/api Retrieves the status of a specific refill. ```APIDOC ## Get Refill Status ### Description Retrieves the status of a specific refill. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'refill_status' - **refill** (string) - Required - Refill ID ### Response #### Success Response (200) - **status** (string) - The status of the refill (e.g., 'Completed', 'Rejected'). ### Response Example ```json { "status": "Completed" } ``` ``` -------------------------------- ### Get Multiple Refill Status Source: https://smmgen.com/api Retrieves the status of multiple refills. ```APIDOC ## Get Multiple Refill Status ### Description Retrieves the status of multiple refills. Up to 100 refill IDs can be provided. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'refill_status' - **refills** (string) - Required - Refill IDs separated by a comma (up to 100 IDs) ### Response #### Success Response (200) Returns an array of objects, each containing the refill ID and its status or an error message. #### Response Example ```json [ { "refill": 1, "status": "Completed" }, { "refill": 2, "status": "Rejected" }, { "refill": 3, "status": { "error": "Refill not found" } } ] ``` ``` -------------------------------- ### Get Order Status Source: https://smmgen.com/api Retrieves the status of a single order. Requires your API key, the action 'status', and the Order ID. ```json { "charge": "0.27819", "start_count": "3572", "status": "Partial", "remains": "157", "currency": "USD" } ``` -------------------------------- ### Get Multiple Refill Statuses Source: https://smmgen.com/api Retrieves the statuses for multiple refills using a comma-separated list of Refill IDs (up to 100). Requires your API key and the action 'refill_status'. ```json [ { "refill": 1, "status": "Completed" }, { "refill": 2, "status": "Rejected" }, { "refill": 3, "status": { "error": "Refill not found" } } ] ``` -------------------------------- ### Get Multiple Orders Status Source: https://smmgen.com/api Retrieves the status for multiple orders using a comma-separated list of Order IDs (up to 100). Requires your API key and the action 'status'. ```json { "1": { "charge": "0.27819", "start_count": "3572", "status": "Partial", "remains": "157", "currency": "USD" }, "10": { "error": "Incorrect order ID" }, "100": { "charge": "1.44219", "start_count": "234", "status": "In progress", "remains": "10", "currency": "USD" } } ``` -------------------------------- ### Get Refill Status Source: https://smmgen.com/api Retrieves the status of a specific refill. Requires your API key, the action 'refill_status', and the Refill ID. ```json { "status": "Completed" } ``` -------------------------------- ### Create Multiple Refills Source: https://smmgen.com/api Initiates refills for multiple orders. ```APIDOC ## Create Multiple Refills ### Description Initiates refills for multiple orders. Up to 100 order IDs can be provided. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'refill' - **orders** (string) - Required - Order IDs separated by a comma (up to 100 IDs) ### Response #### Success Response (200) Returns an array of objects, each indicating the result of the refill request for a specific order. #### Response Example ```json [ { "order": 1, "refill": 1 }, { "order": 2, "refill": 2 }, { "order": 3, "refill": { "error": "Incorrect order ID" } } ] ``` ``` -------------------------------- ### Add Order - Subscriptions Source: https://smmgen.com/api Place an order for a subscription service. ```APIDOC ## Add Order - Subscriptions ### Description Places an order for a subscription service, which can involve a specified quantity, runs, and interval. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page for the subscription - **quantity** (integer) - Required - The desired quantity for the subscription - **runs** (integer) - Optional - Number of runs to deliver - **interval** (integer) - Optional - Interval in minutes between runs ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Default Source: https://smmgen.com/api Place a new order for a service. This is a general endpoint for various service types. ```APIDOC ## Add Order - Default ### Description Places a new order for a specified service. This endpoint is used for services that require a link and quantity. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where the service will be applied - **quantity** (integer) - Required - The desired quantity for the service - **runs** (integer) - Optional - Number of runs to deliver - **interval** (integer) - Optional - Interval in minutes between runs ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Create Refill Source: https://smmgen.com/api Initiates a refill for a specific order. ```APIDOC ## Create Refill ### Description Initiates a refill for a specific order. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'refill' - **order** (string) - Required - Order ID for which to create a refill ### Response #### Success Response (200) - **refill** (string) - Indicates that a refill has been created. The value '1' typically signifies success. ### Response Example ```json { "refill": "1" } ``` ``` -------------------------------- ### Add Order - Mentions Source: https://smmgen.com/api Place an order for mentions on a specific post or page. ```APIDOC ## Add Order - Mentions ### Description Places an order for mentions on a specified link. Usernames for mentions should be provided as a list separated by newline characters. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where mentions will be applied - **quantity** (integer) - Required - The desired quantity of mentions - **usernames** (string) - Required - A list of usernames separated by \n or \r\n ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Mentions with Hashtags Source: https://smmgen.com/api Place an order for mentions based on a hashtag. ```APIDOC ## Add Order - Mentions with Hashtags ### Description Places an order for mentions on a specified link, targeting users who have posted with a specific hashtag. Usernames are scraped from posts with the given hashtag. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where mentions will be applied - **quantity** (integer) - Required - The desired quantity of mentions - **hashtag** (string) - Required - The hashtag to scrape usernames from ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Web Traffic Source: https://smmgen.com/api Place an order for web traffic to a specified link. ```APIDOC ## Add Order - Web Traffic ### Description Places an order to send web traffic to a specified link, with options for country, device, traffic type, and referrer. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to send traffic to - **quantity** (integer) - Required - The desired quantity of traffic - **runs** (integer) - Optional - Number of runs to deliver - **interval** (integer) - Optional - Interval in minutes between runs - **country** (string) - Optional - Country code or full country name (e.g., "US" or "United States") - **device** (integer) - Optional - Device type: 1 - Desktop, 2 - Mobile (Android), 3 - Mobile (IOS), 4 - Mixed (Mobile), 5 - Mixed (Mobile & Desktop) - **type_of_traffic** (integer) - Optional - Type of traffic: 1 - Google Keyword, 2 - Custom Referrer, 3 - Blank Referrer - **google_keyword** (string) - Required if type_of_traffic is 1 - **referring_url** (string) - Required if type_of_traffic is 2 ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Custom Comments Package Source: https://smmgen.com/api Place an order for a package of custom comments. ```APIDOC ## Add Order - Custom Comments Package ### Description Places an order for a package of custom comments on a specified link. Comments should be provided as a list separated by newline characters. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where comments will be added - **comments** (string) - Required - A list of comments separated by \n or \r\n ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Poll Invites from Groups Source: https://smmgen.com/api Place an order for poll invites from specific groups. ```APIDOC ## Add Order - Poll Invites from Groups ### Description Places an order for poll invites to be sent to users from specified groups. Group IDs should be provided as a list separated by newline characters. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the poll - **groups** (string) - Required - A list of group IDs separated by \n or \r\n ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Create Refills for Multiple Orders Source: https://smmgen.com/api Initiates refills for multiple orders using a comma-separated list of Order IDs (up to 100). Requires your API key and the action 'refill'. ```json [ { "order": 1, "refill": 1 }, { "order": 2, "refill": 2 }, { "order": 3, "refill": { "error": "Incorrect order ID" } } ] ``` -------------------------------- ### Add Order - Mentions Media Likers Source: https://smmgen.com/api Place an order for mentions targeting users who liked a specific media post. ```APIDOC ## Add Order - Mentions Media Likers ### Description Places an order for mentions on a specified link, targeting users who liked a particular media post. Usernames are scraped from the likers list of the specified media. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where mentions will be applied - **media** (string) - Required - The URL of the media to scrape likers from ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Comment Likes Source: https://smmgen.com/api Place an order for likes on comments. ```APIDOC ## Add Order - Comment Likes ### Description Places an order for likes on specific comments of a post. Requires the link to the post and the answer number of the poll. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where comment likes will be applied - **answer_number** (integer) - Required - The answer number of the poll for the comment ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Add Order - Comments Source: https://smmgen.com/api Place an order for comments on a specific post or page. ```APIDOC ## Add Order - Comments ### Description Places an order for custom comments on a specified link. Comments should be provided as a list separated by newline characters. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where comments will be added - **comments** (string) - Required - A list of comments separated by \n or \r\n ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Create Refill for an Order Source: https://smmgen.com/api Initiates a refill for a specific order. Requires your API key, the action 'refill', and the Order ID. ```json { "refill": "1" } ``` -------------------------------- ### Create Cancel Order Source: https://smmgen.com/api Initiates the cancellation of one or more orders. ```APIDOC ## Create Cancel Order ### Description Initiates the cancellation of one or more orders. Up to 100 order IDs can be provided. ### Method GET ### Endpoint / ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be 'cancel' - **orders** (string) - Required - Order IDs separated by a comma (up to 100 IDs) ### Response #### Success Response (200) Returns an array of objects, each indicating the result of the cancellation request for a specific order. #### Response Example ```json [ { "order": 9, "cancel": { "error": "Incorrect order ID" } }, { "order": 2, "cancel": 1 } ] ``` ``` -------------------------------- ### Add Order - Mentions User Source: https://smmgen.com/api Place an order for mentions targeting followers of a specific user. ```APIDOC ## Add Order - Mentions User ### Description Places an order for mentions on a specified link, targeting followers of a given username. Usernames are scraped from the followers list of the specified user. ### Method POST ### Endpoint https://smmgen.com/api/v2 ### Parameters #### Query Parameters - **key** (string) - Required - Your API key - **action** (string) - Required - Must be set to "add" - **service** (integer) - Required - The ID of the service - **link** (string) - Required - Link to the page where mentions will be applied - **quantity** (integer) - Required - The desired quantity of mentions - **username** (string) - Required - The URL to scrape followers from ### Response #### Success Response (200) - **order** (integer) - The ID of the newly created order. ### Response Example ```json { "order": 23501 } ``` ``` -------------------------------- ### Create Order Cancellation Source: https://smmgen.com/api Requests cancellation for one or more orders using a comma-separated list of Order IDs (up to 100). Requires your API key and the action 'cancel'. ```json [ { "order": 9, "cancel": { "error": "Incorrect order ID" } }, { "order": 2, "cancel": 1 } ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.