plugin development – WordPress ajax-action how to return content

I'm trying to set up an AJAX action for a plugin I'm building. and using /wp-admin/admin-ajax.php?action=beacon_podio-get_apps I was just starting to Hello everyone0 and I do not see The request is valid or the Invalid request so it seems that the action does not call

I think I'm missing something but I'm not sure what I'm missing.

class testClass {

public service __construct () {
echo "hello world";
add_action (& # 39; beacon_podio-get_apps & # 39 ;, array ($ this, "get_apps"));

public service get_apps () {
if (isset ($ _ POST['app_id'])) {
$ app_id = $ _POST['app_id'];
die ("The request is valid");
die ("invalid request");
new testClass ();

I was reading but it is missing the URL I am supposed to use.

I've also tested this on /wp-admin/admin.php?action=beacon_podio-get_app and get the same result