Please note: Integration with the NestForms API is only available to Premium clients.
If you are a third party public service that would like to integrate with NestForms, contact us with your requirements, create a NestForms free account and we might enable the API for you without any charge.
This feature allows you to access the form details from an external service, using the RESTful JSON API and the standard OAuth2 login system.
To use the oAuth feature, go to Applications, create a new application, if you have not already created one.
Fill in the App name and it's endpoints. An Endpoint is a URL address and needs to exactly match the redirect_url you are going to set up in your oAuth2 client configuration. You can set multiple Endpoints for one application to allow you to react to the different needs of your application.
After the application is created, you can see a new tab on the Application Edit page called Keys. Here you can access the Client ID and Client Secret keys which are needed within your application.
The following endpoints are currently available: Authentication, Access Token, Forms list, Reports.
See more details on the API Technical Details page.
Demo Example Application - online test #
If you do not want to install this example within our test environment and would like to see your data, you can try this example application on our test environment.
You can very quickly connect to your account and see how you can use the NestForms API.
This is a great starting point for testing the NestForms API. When you would like to integrate, you will need to create an application on the nestforms.com website and we would recommend downloading the PHP Demo Example Application for more details.
Demo Example Application in PHP #
You can download our example application, which is able to authenticate with nestforms.com, refresh the tokens, if necessary and list all available forms and show the form reports. Example app is also available in the Public GIT in GitLab - feel free to downlaod from there or add any comments or suggest merges.
To acquire required libraries using composer, run composer update in the directory with index.php and the composer.json. The composer will download all required libraries.
In case you want to use packed libraries, make sure the vendor directory is in the same folder as index.php.
Create an application in the nestforms.com website. You will need to set your current test application URL.
Then you only need to update the index.php with the Client ID and the Client Secret that you've received in the previous step and then open the index.php in the browser.
You will be redirected to the nestforms.com website (you might be asked to login first) where you will confirm the access level rights and then you will be redirected back to the test application which will display a list of all your forms.
If you are testing on a windows machine and you receive the following error: ERROR: unable to fetch access token with authorization code, just edit the source code of the index.php file and uncomment line 24 with $http_client_config.
The example application covers two use cases:
Working with Forms, Responses and Custom DB
This example will show you a list of all available forms. Once you click on the form, you will see all Responses. You can also list all related members. You can also list the custom DB tables within your NestForms account including the option to update the values.
This example will let you generate a special URL using the API. This URL will allow you to display the NestForms website within an iframe. This might be useful, for example, when you want to login your client automatically within your intranet without the need for them to login.