P
P
puffyq2020-07-14 16:39:08
Python
puffyq, 2020-07-14 16:39:08

Structure of python file with VK API request?

Please explain how to correctly write a request for the photos.copy method. Here is the url for the method with parameters.
https://api.vk.com/method/photos.copy?owner_id=457...
Token with access to photos. It remains only to write the structure of the .py file, but I do not know how to do it correctly.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
HemulGM, 2020-07-14
@HemulGM

1. Read the general documentation of the VK API.
2. Read general information about making REST requests
3. Understand what a token (or authorization) is needed and how to get it
4. Execute a request

Remains only ...

That could be said if you did something

S
soremix, 2020-07-14
@SoreMix

First import libraries to work
Then write global variables
Next declare functions
if __name__
code

Y
yamudaqq, 2020-07-14
@yamudaqq

import requests

response = requests.get('https://api.vk.com/method/photos.copy?owner_id=457279089&photo_id=-159797147&access_token=TOKEN&v=5.120')
print(response.text)
input()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question