W
W
WUDIK2020-01-01 17:34:39
In contact with
WUDIK, 2020-01-01 17:34:39

Whether check it is possible to write to the user, or not?

Error:
var z = JSON.parse(bisas)
^
SyntaxError: Unexpected token o in JSON at position 1
Code:
for(let m in base.bs){
if(base.bs[m].notifications == true) {
console .log(base.bs[m].id)
const bisas = request(" https://api.vk.com/method/messages.isMessagesFromG... ");
var z = JSON.parse(bisas)
let allowed = Number(z.response.is_allowed)
console.log(allowed)

Everything seems to be correct, why does it give such an error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
McBernar, 2020-01-01
@WUDIK

What do you have in response to the request?
>Unexpected token o in JSON at position 1
This is an invalid JSON format error, that is, something else arrives.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question