How to handle auth in target apii?

Not applicable

Is there a policy I can use to set the auth info for target api?

For example, I have an api proxy that people can make request to with basic auth, but the target api is using oauth. How do I add my oauth creds to this request to make it work?

So it's like when people making request to my api proxy they provide a apikey, but when this request is forward to target api, I need to provide my own oauth creds.

Use case is that I wanna share my quote on target api with many people, but don't wanna share my creds with them.

Thank you!

0 3 246
3 REPLIES 3

Hi @vincent --

I'm not sure I'm clear on your question.

When you say "provide my own oauth creds" do you mean an access token that you already have? Or do you want to generate a token externally by calling the target's own token generating API? Also, I didn't understand what you meant by "share my quote on target api..." Was that a typo?

If you already have an access token that lets you make calls to the target stored in Edge, you can use the AssignMessage policy to craft the target request however you wish and include that token for each call. AssignMessage is perfect for modifying the target request. You can also use a JavaScript policy. Does this help?

Hi @wwitman, Yes that's what I'm looking for. It looks promising. Thank you! Sorry about my typo!

@vincent

Cool -- glad to hear it helped. Check back if you have any other questions.

Will