T
T
TRUEC0DER2021-03-29 17:20:21
JavaScript
TRUEC0DER, 2021-03-29 17:20:21

How to connect products to a group via VK API?

There is a script with a vk-io module connected to it for requests to VKontakte, I need to connect products to a group via the VK API using the groups.edit method, the parameter itself is in the documentation, but the requests do not give anything, all other parameters are quietly changed, therefore there can be no errors in the group id / token, everything I tried is below:

// config.group_id - айди группы из чисел
    // Первый способ
    const editGroup = await vk.api.groups.edit({
        group_id: config.group_id,
        market: 1
    })

    // Второй способ
    const editGroup = await vk.api.groups.edit({
        group_id: config.group_id,
        market: 1,
        market_country: 3,
        market_currency: 643,
        market_contact: 0,
    })

    // Третий способ
    const editGroup = await vk.api.groups.edit({
        group_id: config.group_id,
        market: 1,
        market_country: [ 3 ],
        market_currency: 643,
        market_contact: 0,
    })

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question