Problem with Webhook after 0.4.9 update [SOLVED]

Dear forum,

I have just installed the new firmware in my photon and I have a problem with a specific function my program.

I was using a webhook to write data to a MySQL database . My webhook file is

{
    "event": "blabla",
    "url": "http://www.xxxxxx.com/insert.php",
    "requestType": "POST",
    "form": {
        
        "data": "{{SPARK_EVENT_VALUE}}",
        "published_at": "{{SPARK_PUBLISHED_AT}}",
        "coreid": "{{SPARK_CORE_ID}}"
    },
    "mydevices": true
}

My code for calling this event is

    Particle.publish("blabla", publish_buffer, 60, PRIVATE);

Is this happenned to anyone else ? When I had the 0.4.7 everything was working very nice.

Any solution to that?

Kind Regards
John

Is what happening to anyone else? You haven't said what's wrong.

2 Likes

Hi , yes sorry.

The photon is working OK but it does not publish any data.

the webhook is not working at all.

any suggestions?

@johnyrobot5, are you seeing the publish event in the dashboard? When did you initially create the webhook? Do you have the latest version of the CLI?

Hi peekay,

Yes I can see the event in the dashboard . But why is not writing to the MySQL?

I do not understand.

Yes, I gave the latest CLI

@johnyrobot5, do you see the webhook response in the dashboard as well?

Hi,

This is what I see in the dasboard.

I hope that helps.

I have also gone to MySQL logs in the server and no POST methods are logged , That might seem that the webhook for some reason does not POST to the PHP file in the server.

OK I have found where was the problem and SOLVED it

The webhook I had created in the past was not working. I created a new webhook and everything worked fine .

Thank you for your answers

2 Likes