Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda