Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
Javascript (WebdriverIO) - Restfull API Request with request-promise?

I am current facing a challenge with a GET Request using the "request-promise" library. Currently Using Javascript with WedriverIO. The response that I get is a validation error or "Resource Owner Cancelled Authentication" error.

Please can someone assist me and let me know if my code below is incorrect or what the best practice in doing this.

var fs = request = require('request-promise');
exports.request = async function () {
  const params = {
    
        uri: 'https://api-boxdev.abcportal.com' +'/abc/openportal/javawebtokenfrontend',       
        rejectUnauthorized: false,
        method: 'GET',           
        headers: {
                   
         'User-Agent': "request",      
          Authorization: "Bearer "+ global_accessTokenVal
 }      
      //commented out
      //  headers = new Headers({ 'User-Agent': 'Request-Promise', 'Authorization': 'Bearer ' + global_accessTokenVal   }) 
      };

      await request.get(params, async function Callback(error, response, body) {
        storecallbackJWTerror = error;
        storecallbackJWTResponse = response;
        storecallbackJWTBody = body; 
        bodyResponse = JSON.parse(body)
        })
        
};

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!