Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
Permission Issue when trying to verify Google Play Subscription with NodeJS google-play-billing-validator

I am trying to verify Subscription Purchase from Android App ( Google Play ) on my server side using node and google-play-billing-validator package. I have followed the instruction and added services account along with accounts permission ( tried both only account and admin ) but its still returns me with insufficient permissions . I don't know why its doing that and whats wrong .

        var Verifier = require('google-play-billing-validator');
    
    var options = {
        "email": '###########################',
        "key": "PRIVATE",
    };
    
    
    
    try {
    
        var verifier = new Verifier(options);
    
        let receipt = {
            packageName: "com.tech.ichat",
            productId:

 "mychat_bms1",
        purchaseToken: "hajlffdcmmkdijnilkogpih.AO-J1OwYTQjVf57Exl8eJBRVNo4VLfwlWIOJykDfyASPLx9YbxvWwP0qDqls14Llcyt8cyslTCT4fN-Xy-0Vg-9BETVnTrxpPQ"
    };


    let promiseData = verifier.verifySub(receipt)

    promiseData.then(function (response) {
        // Yay! Subscription is valid
        // See response structure below
        console.log('API SUCCESS RESPONSE', error);

    })
        .then(function (response) {
            // Here for example you can chain your work if subscription is valid
            // eg. add coins to the user profile, etc
            // If you are new to promises API
            // Awesome docs: https://developers.google.com/web/fundamentals/primers/promises

        })
        .catch(function (error) {
            // Subscription is not valid or API error
                // See possible error messages below
                console.error(error);
            });
    
    } catch (error) {
        console.error('Exception Handled', error);
    }

response I got .

{
  isSuccessful: false,
  errorCode: 401,
  errorMessage: 'The current user has insufficient permissions to perform the requested operation.'
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda