Blank URL's for Webhook and Video widgets

@Dmitriy and @BlynkAndroidDev would it be possible to remove the url syntax check for the Webhook and Video widget, or at least ask the project creator to confirm acceptance of the invalid url.

When projects are published there is no way for end users to change these url’s and it maybe they want to use a different API or video stream etc.

So if blank url’s were accepted they would simply paste the required details via Terminal etc.

I am guessing there are also other widgets that could be better handled for published projects.

1 Like

So, this is request not only for empty urls support in webhook and video, but also property update in them for at least ‘url’ field ?

@BlynkAndroidDev that’s taking it a step further than I was thinking. Initially I thought a setProperty wouldn’t work for the end user (hardware buyer) but I guess it would as long as the published app developer includes the code for it.

So end user puts url in Terminal for example and setProperty updates the url.

At the moment we are coding api keys etc into /pin/ from Terminal but the Webhook (or video) widget needs to have a fixed prefix of at least “http://somedomain.com” but the end user needs to be able to change this to “http(s)://anotherdomain.com”.

Yep, understood.

I’ve checked the code - WebHook should work in such way as it is not clearing url field even if it is wrong, but video would clear (I could change this). Maybe you mean exported apps widget’s settings? In them we have no support for WebHook changes.

Maybe it is not about only the app. @Dmitriy could your look into this issue.

Just to be clear I am referring to “published apps” or specifically the pre publication phase of using “My Apps” to test the resulting published project.

If I leave the Webhook url field with any of these options it gives a red warning message that it’s the wrong format:

'1. empty
'2. http://
'3: https://
'4: https:///pin/
'5: http:///pin/
'6: /pin/

I haven’t actually coded up a Webhook after seeing the error message but I guess ideally we need it to accept item 6 /pin/

Are you saying that in My Apps the error message is ignored and that we could use /pin/ and code up a variable to cover the full url e.g. https://somerandom.domain.com/someapi&json{“fieldname”:value}&somekey=fhfhfhfhfhfhfhfhfhfhftsmskkfnsnnnf

Same for the Video widget.

Any thoughts @Dmitriy?

I checked with a project (not a My App) to see if /pin/ alone would be accepted for the url.
Webhook fails but no error message on “local” cloud server with debugging level set at debug.

Now, I had got your point. Yep, we do not support /pin/ for formatting webhook’s url. I’m sure for us it would be easier just to add set property url, as this formatting will require work of @Dmitriy who has a lot of other issues to work on. In video widget we seems have this set property ‘url’ from the beginning, had you tried to check it?

We actually do support this :slight_smile:.

https://api.thingspeak.com/update?api_key=xxxxxx&field1=/pin/

is allowed.

Here point is in using /pin/ for a domain, not for a param.

Not looked too closely at the video widget for published apps yet. Will review when I have time.

but we only want support for /pin/ and it’s for published apps where it’s currently not possible for end users to access the Webhook widget to set / change a domain. We can handle collecting the domain from the end user via Terminal etc.

And, by the way, as I mentioned before, in webhook we do not clear any wrong url, that seems not correct (it means it has /pin/ in it.

Yes I am able to enter /pin/ for the full url in the Webhook widget but then sending the full url to the pin is not processing the request.

1 Like

@BlynkAndroidDev and @Dmitriy turns out Webhook is fine with the following syntax in the Widget:

h/pin/

then the pin in code can be:

"ttp://reallybigurlwithjsonandapikeyetc.com"

or

"ttps://reallybigurlwithjsonandapikeyetc.com" 

Obviously with the correct formatting of the url for json etc.

So as long as you have the minimum h and /pin/ in the widget it’s OK.

@Dmitriy seems it’s a server side issue - to support formatting url in /pin/

@Costas next release on Android will support url and methor properties update

1 Like

Thanks @BlynkAndroidDev

I took a closer look at the video widget for My Apps today and noticed end users can set the url but once it’s been set it’s not possible to change it.

mm, I guess click on the url field in the widget’s below should lead to settings

@BlynkAndroidDev once the video url has been set then clicking on the video stops the video, which is fine but no way I can see to change the url.