# Need Assistance with creating webhook for Weather Underground

**URL:** <https://community.particle.io/t/need-assistance-with-creating-webhook-for-weather-underground/61260>\
**Category:** Cloud\
**Tags:** boron\
**Created:** [October 6, 2021, 10:06pm UTC](https://community.particle.io/t/need-assistance-with-creating-webhook-for-weather-underground/61260 "2021-10-06T22:06:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![robc](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@robc](https://community.particle.io/u/robc)\
**Post date:** [October 7, 2021, 1:11am UTC](https://community.particle.io/t/need-assistance-with-creating-webhook-for-weather-underground/61260/2 "2021-10-07T01:11:04Z")

</div>

> [@SanDiegoSeth](#):
>
> Would really appreciate advice on how to get this to work properly.

Hi there!! Below I post some code which might help. I have not actually posted data to Weather Underground so I am not certain if I can explain what is wrong. But, I took a stab at demonstrating the use of char arrays instead of String.

Also, here is an interesting and recent post regarding c-strings and char. Thanks to @gusgonnet and all the contributors, btw:

[https://community.particle.io/t/best-practices-with-c-strings-char-a-vs-char-b/59639](https://community.particle.io/t/best-practices-with-c-strings-char-a-vs-char-b/59639)

Now, for the code example. Try your version of the code below in your firmware and see what works for you:

```auto
const char myStationId16[16] = "KCAVISTA171";
const char myPassword16[16] = "XXXXXX";
char myDateUtc32[32] = "2000-01-01+10%3A32%3A35"; // over simplified, for sure!
char myWindDirection16[16] = "230";
char myOtherData16[16] = "blah_blah_blah";

// example of what the data should (might???) look like
char mySendData256[256] = "ID=YYYYYYYY&PASSWORD=XXXXXX&dateutc=2000-01-01+10%3A32%3A35&winddir=230&windspeedmph=12&windgustmph=12&tempf=70&rainin=0&baromin=29.1&dewptf=68.2&humidity=90";

// display example data buffer
Particle.publish("example_data", mySendData256, PRIVATE, WITH_ACK); 
delay(1000);

// let's build the send data field for real...
sprintf(mySendData256, "ID=%s&PASSWORD=%s&dateutc=%s&winddir=%s&myOtherDataHere=%s", myStationId16, myPassword16, myDateUtc32, myWindDirection16, myOtherData16);   
Particle.publish("test_data", mySendData256, PRIVATE, WITH_ACK); 
delay(1000);
    

```

---

_[View the full topic](https://community.particle.io/t/need-assistance-with-creating-webhook-for-weather-underground/61260)._
