V
V
Vladislav2018-12-30 16:30:48
CORS
Vladislav, 2018-12-30 16:30:48

AJAX request on VUE to VK API?

Hello everyone, I'm trying to pull data from my page using api vk.
The following error appears in the console:
5c28c78db0acf069452130.png

The request code itself:

axios
        .get('https://api.vk.com/method/users.get?user_ids=' + this.user_id +'&access_token=' + this.access_token +'&v=5.92')
        .then(response => (this.info = response));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2019-01-03
@vos_50

The issue was resolved by using vk.api.call instead of axios

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question