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

148
Views
How to pass bearer authorization header to external api, created service using openapi spec in loopback4

I want to call an external api which needs bearer token as authorization. I have created controller and service using 'lb4 openapi' command. I couldn't find direct way to send header.

this is interface for external service which needs a param:

export interface MerchantService {
  /**
   * @param partnerId 
   * @returns OK
   */
  getMerchantDetails(partnerId: string): Promise<MerchantResponse>;

}

i'm calling this from another service like this:

let merchantDetails = await this.merchantService.getMerchantDetails(partner_id)

now i want to pass one bearer authorization token to this api also, how can i pass that.

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!