Plug-in Docs Overview


In this section, we introduce APIs specifically used when creating your own plug-ins.
For a general introduction on plug-ins, and steps on building your plug-ins, visit What are plug-ins?.

Before we dive straight into the methods, you first need to understand how users set up and use plug-ins. Users are able to add plug-ins to their apps through the apps settings, to provide it additional features. Users will be able to set up necessary settings in the settings of the plug-in (which is inside the settings of the app), which will be ready for use once the settings are saved and changes are applied to the app.

The Plug-in JavaScript API

The Kintone Plug-in Docs introduces several methods, mainly based around saving plug-in setting data, and retrieving those data.

Set Config

This is used on the plug-in setting page, to save data that users input. This data can then be called using the getConfig() method.
Let's say you've built a plug-in that controls the color of a specific field when it equals a particular value. That means in the plug-in settings, you'll want to have a text field for users to input the field's field code, and maybe a drop down to choose the color. Once users input the field info and color info, they'll click save - this is where you'll initiate the setConfig to save these values.

Get Config

This is used to call the values that were saved into the settings of the plug-in with the setConfig() method.
Let's say the user has input the settings in the Set Config example above - then on the record list page, you'll want to run a JavaScript file that will call getConfig() to get the field code value and color information from the settings page. Use this information, and run your JavaScript code so it colors those fields with that color.

Kintone Plug-in


This method is used to run 3rd party REST APIs, i.e. non-kintone REST APIs.
If you need to use values from the plug-in Settings page with the 3rd party APIs, you will need to save and get those data using the below two APIs, and not with the setConfig() and getConfig() methods. Note that this API is different from the Kintone Proxy API.

Set Config for proxy()

This API is similar to the setConfig() method, as it saves user inputs on the Plug-in Settings page.
The difference here is that values saved using this method, are to be used with the Kintone Plug-in Proxy API - meaning that values saved here are meant to be passed on to 3rd party REST API services. A common use case here would be to save user name and passwords, or API keys, that you would need for authentication purposes with other services.

Get Config for proxy()

This API is similar to the Get Config API, as it retrieves settings saved on the Plug-in Settings page.
This API though only retrieves data saved with the setProxyConfig method. Use the getConfig() method if you need to retrieve Plug-in setting data that was saved with the setConfig() methodp

Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!