# HTTP auth  - Calling external API with parameters

**URL:** <https://community.f5.com/t/http-auth-calling-external-api-with-parameters/73392>\
**Category:** Technical Forums\
**Tags:** application-delivery\
**Created:** [November 1, 2023, 9:06pm UTC](https://community.f5.com/t/http-auth-calling-external-api-with-parameters/73392 "2023-11-01T21:06:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktm\_2000](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@ktm\_2000](https://community.f5.com/u/ktm_2000)\
**Post date:** [November 1, 2023, 9:06pm UTC](https://community.f5.com/t/http-auth-calling-external-api-with-parameters/73392/1 "2023-11-01T21:06:56Z")

</div>

Folks I am relatively new to F5 and am trying to do a custom auth by passing paramaters to an API and getting a response.

The api is expecting me to call&nbsp; &nbsp; &nbsp;url\param1\param2\param3

Upon success it currently returns true

I’ve tested HTTP auth by setting up an AAA server and tried basic auth and I can build a statement with the required parameters and get it sent to the API and the API is successfully evaluating the conditions as expected.&nbsp; &nbsp;If the API replys with true on success or with false for failure the F5 is considering either condition a success.

my issue is that in forms or custom post,&nbsp; you can define what the success criteria is and in basic that option is not available.&nbsp; &nbsp; &nbsp;I can have the developer code whatever is needed for a successful response but am struggling to find out what the F5 is looking for to determine a successfull response.

I have found the following and it seems that it is looking for a “200” as success

[https://stackoverflow.com/questions/32671292/determine-whether-a-basic-authentication-login-was-successful](https://stackoverflow.com/questions/32671292/determine-whether-a-basic-authentication-login-was-successful)

Can anyone confirm that the F5 is indeed looking for a “200” response?

thanks in advance!!!

---

<div class="post-metadata">

**Author:** ![Niels\_van\_Sluis](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/niels_van_sluis/32/3759_2.png) [@Niels\_van\_Sluis](https://community.f5.com/u/Niels_van_Sluis)\
**Post date:** [November 2, 2023, 5:58am UTC](https://community.f5.com/t/http-auth-calling-external-api-with-parameters/73392/2 "2023-11-02T05:58:27Z")

</div>

When using Basic authentication a status code of 200 means that all is okay and no authentication is needed or that authentication already was successful. The server should respond with a status code of 401, until the client has been successfully authenticated. The picture below shows how it should work.

 ![1F2E2578-3C7F-4B0C-8D47-81E6DF493726.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/2/25b0666fc1fd73f8e984a995aabcac2bb7e89c9c.png)

---

<div class="post-metadata">

**Author:** ![ktm\_2000](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@ktm\_2000](https://community.f5.com/u/ktm_2000)\
**Post date:** [November 2, 2023, 2:06pm UTC](https://community.f5.com/t/http-auth-calling-external-api-with-parameters/73392/3 "2023-11-02T14:06:03Z")

</div>

Thank you,&nbsp; &nbsp;We had it coded to reply http 200 for both and had text to differentiate between valid or not.&nbsp; &nbsp;I had the developer throw http 401 - unauthorized for false and redeployed.

All is working well.&nbsp; &nbsp; Thank you for your insight!!!
