M
M
Maxim2016-06-14 18:35:29
In contact with
Maxim, 2016-06-14 18:35:29

How to send POST request to VK API via JS or jQuery?

Purpose:
Send long requests to VK API methods (which are available only to standalone applications) via JS (or PHP in extreme cases). Specifically, placing posts on the wall with a large amount of text, updating the description of the group, etc.
Problem:
Through JS, it is possible to send only data in jsonp format, and this can only be done through GET requests, the length of which is limited. Accordingly, the browser cannot send a long post to the wall. Exactly how to update the description of the group. An error appears in the console immediately.

Question:

How can you bypass this limitation? It is possible using the server and PHP, but I didn’t succeed there, since the hosting IP is different from mine and the Token from the hosting is not accepted by the Contact, and receiving the Token through the server is somehow hemorrhoids. Everything works fine on the local server.
I would be grateful for any tips and hints, any ideas on crutches and so on. I've been breaking my head over this problem for more than a week, I re-read the whole Google, I did not find a solution. I shortened the GET request as much as I could, but this is not enough to send the information of the required volume.

Write any ideas, I will be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-06-14
@MaxStrate

How can you bypass this limitation? It is possible using the server and PHP, but I didn’t succeed there, since the hosting IP is different from mine and the Token from the hosting is not accepted by the Contact, and receiving the Token through the server is somehow hemorrhoids. Everything works fine on the local server.

There is no such protection.
It means they did something wrong. I have such authorization
for everyone at the service level , he does not care what IP was there. A lot of profiles are connected, they work on php backend, there are no problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question