# How can I get the response from an External API endpoint to execute my own code?

**URL:** <https://forum.convai.com/t/how-can-i-get-the-response-from-an-external-api-endpoint-to-execute-my-own-code/4985>\
**Category:** Unity SDK\
**Tags:** question, unity\
**Created:** [August 21, 2025, 4:41pm UTC](https://forum.convai.com/t/how-can-i-get-the-response-from-an-external-api-endpoint-to-execute-my-own-code/4985 "2025-08-21T16:41:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno\_Leonardo\_Miche](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/bruno_leonardo_miche/32/5395_2.png) [@Bruno\_Leonardo\_Miche](https://forum.convai.com/u/Bruno_Leonardo_Miche)\
**Post date:** [August 21, 2025, 4:41pm UTC](https://forum.convai.com/t/how-can-i-get-the-response-from-an-external-api-endpoint-to-execute-my-own-code/4985/1 "2025-08-21T16:41:24Z")

</div>

There’s the weather example in the External API, let’s say I have some custom animations on my project that I want to trigger if it’s raining ou sunny etc.

Using External APIs, how can I get the response contents in code? I want to execute things AFTER the External API runs.

---

<div class="post-metadata">

**Author:** ![K3](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/k3/32/2611_2.png) [@K3](https://forum.convai.com/u/K3)\
**Post date:** [August 21, 2025, 9:27pm UTC](https://forum.convai.com/t/how-can-i-get-the-response-from-an-external-api-endpoint-to-execute-my-own-code/4985/2 "2025-08-21T21:27:28Z")

</div>

Hello @Bruno_Leonardo_Miche,

For this type of use case, External API is not the right approach. If you want to trigger something inside your game engine environment, you should run that logic directly in your game engine code and handle the triggers there.

You can find more details about External API usage in our documentation:  
[https://docs.convai.com/api-docs/convai-playground/character-customization/external-api](https://docs.convai.com/api-docs/convai-playground/character-customization/external-api)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex004/uploads/convai/original/1X/e60ef96aa7334c5ccf6682f6c6dbc20fcfa96b49.png) [@system](https://forum.convai.com/u/system)\
**Post date:** [September 20, 2025, 9:27pm UTC](https://forum.convai.com/t/how-can-i-get-the-response-from-an-external-api-endpoint-to-execute-my-own-code/4985/3 "2025-09-20T21:27:55Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
