FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Kickstart webhook in kickstart.json

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    9.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tschlegel
      last edited by

      I would like to be able to define a webhook in my kickstart.json file specifically for the kickstart.success event. It seems based on what I've read so far this is possible. I have the following kickstart config:

      {
        "variables": {
          "apiKey": "2fbf8fbf-32bb-456e-a71e-24830dd82866"
        },
        "apiKeys": [
          {
            "key": "#{apiKey}",
            "description": "Unrestricted API key"
          }
        ],
        "requests": [
          {
            "method": "POST",
            "url": "/api/webhook",
            "body": {
              "webhook": {
                "connectTimeout": 3000,
                "global": true,
                "readTimeout": 3000,
                "description": "Kickstart Sucess Webhook",
                "eventsEnabled": {
                  "kickstart.success": true
                },
                "url": "https://webhook.site/bec11612-a727-4ff8-88f1-73d733b5eaca"
              }
            }
          }
        ]
      }
      

      When my docker container starts up I do see that the kickstart is executed:

      ---------------------------------------------------------------------------------------------------------
      -------------------------------------------- Kickstarting ? --------------------------------------------
      ---------------------------------------------------------------------------------------------------------
      2024-09-06 07:33:15.036 PM INFO  io.fusionauth.api.service.system.kickstart.KickstartRunner - Summary:
        - Created API key ending in [...2866]
        - Completed [POST] request to [/api/webhook]
      

      However, the hook is never called. (If it is and there's an error I don't see that either).

      Note that I have no tenants or applications at this point: just initial the API key (and I confirmed that I can call the API using this key after kickstarting completes).

      I have also set the global: true option in the webhook body as the documentation indicates this is required in order for the hook to get called when there're no tenants.

      I can also confirm that a curl POST to the webhook URL from within the running FusionAuth container does reach that webhook.site URL.

      Am I going about this correctly?

      A 1 Reply Last reply Reply Quote 0
      • A
        Alex Patterson @tschlegel
        last edited by

        @tschlegel thank you for reporting! This appears to be a bug. I have created the same issue within our GitHub issues page to follow up with, feel free to follow over there for status. I have prompted the engineering team as well so it gets on our "short" list.

        https://github.com/FusionAuth/fusionauth-issues/issues/2863

        1 Reply Last reply Reply Quote 0
        • First post
          Last post