Wasend

Get Group Picture

Retrieve the profile picture of a WhatsApp group

Get Group Picture

Retrieve the profile picture of a WhatsApp group.

Endpoint

GET /{sessionId}/groups/{groupId}/picture

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication

Path Parameters

ParameterTypeRequiredDescription
sessionIdstringYesThe session ID
groupIdstringYesThe group ID

Response

{
  "success": true,
  "picture": {
    "url": "string",
    "type": "string",
    "size": 0
  }
}

Examples

import { WasendClient } from '@wasend/core';

const client = new WasendClient({
  apiKey: 'YOUR_API_KEY',
  baseUrl: 'https://api.wasend.dev'
});

// Get group picture
const result = await client.getGroupPicture(sessionId, groupId);

console.log('Picture URL:', result.picture.url);
const { WasendClient } = require('@wasend/core');

const client = new WasendClient({
  apiKey: 'YOUR_API_KEY',
  baseUrl: 'https://api.wasend.dev'
});

// Get group picture
const result = await client.getGroupPicture(sessionId, groupId);
from wasend import WasendClient

client = WasendClient(
    api_key='YOUR_API_KEY',
    base_url='https://api.wasend.dev'
)

# Get group picture
result = client.get_group_picture(
    session_id=sessionId,
    group_id=groupId
)
package main

import (
    "context"
    "fmt"
    "log"
    "github.com/wasenddev/wasend-sdk-go"
)

func main() {
    client := wasend.NewClient("YOUR_API_KEY", "https://api.wasend.dev")

    // Get group picture
    result, err := client.GetGroupPicture(context.Background(), sessionId, groupId)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("Picture URL: %s\n", result.Picture.URL)
}
using Wasend.SDK;

var client = new WasendClient("YOUR_API_KEY", "https://api.wasend.dev");

// Get group picture
var result = await client.GetGroupPictureAsync(sessionId, groupId);
import com.wasend.sdk.WasendClient;

public class Main {
    public static void main(String[] args) {
        WasendClient client = new WasendClient("YOUR_API_KEY", "https://api.wasend.dev");

        var result = client.getGroupPicture(sessionId, groupId);
    }
}
<?php

use Wasend\SDK\WasendClient;

$client = new WasendClient([
    'api_key' => 'YOUR_API_KEY',
    'base_url' => 'https://api.wasend.dev'
]);

// Get group picture
$result = $client->getGroupPicture($sessionId, $groupId);
require 'wasend-sdk'

client = Wasend::Client.new(
  api_key: 'YOUR_API_KEY',
  base_url: 'https://api.wasend.dev'
)

# Get group picture
result = client.get_group_picture(
  session_id: sessionId,
  group_id: groupId
)
import WasendSDK

let client = WasendClient(apiKey: "YOUR_API_KEY", baseURL: "https://api.wasend.dev")

// Get group picture
let result = try await client.getGroupPicture(
    sessionId: sessionId,
    groupId: groupId
)
use wasend_sdk::WasendClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = WasendClient::new("YOUR_API_KEY", "https://api.wasend.dev");

    // Get group picture
    let result = client.get_group_picture(
        sessionId,
        groupId
    ).await?;

    println!("Picture URL: {:?}", result.picture.url);

    Ok(())
}
curl -X GET "https://api.wasend.dev/{sessionId}/groups/{groupId}/picture" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Fields

FieldTypeDescription
successbooleanWhether the operation was successful
pictureobjectThe group picture information

Picture Object

FieldTypeDescription
urlstringURL to download the picture
typestringMIME type of the picture
sizenumberSize of the picture in bytes

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Not authorized to get picture
404Not Found - Session, group, or picture not found
429Too many requests - Rate limit exceeded
500Internal server error

Notes

  • You must be a member of the group to get its picture
  • The picture URL is temporary and expires after 24 hours
  • The response includes the picture's metadata
  • The picture is returned as a URL to download
  • The URL can be used to download the actual image
  • The picture type is typically image/jpeg or image/png
  • The size is in bytes