​​run GCPapi through apigee & token as hder param

sidamore4
Participant I

HI I am new to apigee i have a jar which when executed using command java -jar usr/sid/edwi-auth-token.jar -u https://edwitestapi-iq734nlrra-de.a.run.app/getEdwiMarkerEvent gives a token that token passed as authorization and then hit google cloud api https://edwitestapi-iq734nlrra-de.a.run.app/getEdwiMarkerEvent how can i do this in apigee or if i can execute curl cmd directly by keeping jar that gives token somewher curl cmd -->curl -H "Authorization: Bearer $(java -jar /usr/sid/edwi-auth-token.jar -u https://edwitestapi-iq734nlrra-de.a.run.app/getEdwiMarkerEvent)" https://edwitestapi-iq734nlrra-de.a.run.app/getEdwiMarkerEvent

0 4 190
4 REPLIES 4

Not applicable

Apigee can call to http endpoint. You need to host a webservice and proxy that one through Apigee and access.

that i hav learned through the very forst video is there a way to add header parrameter be4 calling and how or can we call 2 hhttps one end point from one will get token and that token can b passed to another http endpoint .

if any example plz share or video

<AssignMessage name='AM-AssignHeader'> 
  <Set>
    <Headers>
      <Header name='myheader'>{variable_containing_value}</Header>
    </Headers>
  </Set>
</AssignMessage>

Not applicable

Yes, you can do. One service callout you can use to get token, from a http endpoint and then configure that using assign message policy and send to the other endpoint.