x

Backendservice with a input?

Hi there Community!

I inted to do a backendservice which gets some data from an API. However this API requires and Id.

Can this ID be set from the editor somehow? So that I have a piece of Javascript in the <head> tag which has the script and the ID set from the editor?

1,675 Views
Message 1 of 4
Report
1 Best Answer

Best Answer

The solution was to create on oAuth application, in which the user can supply an ID and the Application will generate the snippet and insert it, using the Weebly API Smiley Happy

View Best Answer >

1,621 Views
Message 4 of 4
Report
3 REPLIES 3

Hello @ak_andreas


You said, I intend to build a backend service which gets data from the Weebly API, however this API requires an ID.
Which of the Weebly APIs are you referring to exactly, and which ID please?

There are many different IDs used in the Weebly APIs depending upon which API you are using and the use-case you are trying to solve: site_id, user_id, client_id, platform_app_id, blog_post_id, etc...

The way you've described your use case (having a piece of Javascript in the <head> tag which sets a dynamic ID) makes me think the more appropriate approach for your use-case needs is: develop a custom theme app instead of a backend service app. You could Add Options to Your Theme which would simplify the installation/configuration process greatly (for such a simple use case).

Please read through the documentation links I've provided and let me know if this gets you moving in the right direction please.

1,630 Views
Message 2 of 4
Report

Hi there!

making the app as a theme sounds interesting. However it doesn't seem to offer the opptertunity, in theme options, to make an text-input, where the user may set an Id for the given Javascript.

1,625 Views
Message 3 of 4
Report

Best Answer

The solution was to create on oAuth application, in which the user can supply an ID and the Application will generate the snippet and insert it, using the Weebly API Smiley Happy

1,622 Views
Message 4 of 4
Report