Forum

Notifications
Clear all

Cognito Forms API

3 Posts
2 Users
0 Reactions
351 Views
(@pietc)
Posts: 88
Estimable Member
Topic starter
 

Hi,

I was wondering if anyone can help me with using Power Query to connect to Cognito Forms using their REST API.  I'm using a teams account and have set up an API and access token (key), but am struggling to get the connection to work.  In PQ, I've used Get Data From Web, then enterered "https://www.cognitoforms.com/api/forms/__/entries" as the URL.  In the next screen I select Web API and enter the token, but get an error message saying that I need to specify the web API key name.  My API does have a name, but I can't see where to provide it (see picture).

I'd be gratefuPQ-API-entry-01.pngl for any assistance!

Pieter

 
Posted : 27/09/2024 3:34 pm
Anders Sehlstedt
(@sehlsan)
Posts: 971
Prominent Member
 

Hello,

Just checking the support page Cognito Forms API - Cognito Forms should give you the answer you are looking for. I added some extra spaces in the example URL, to break the automatic creation of a link.

How to pass the API key in the URL

If your external system does not support custom headers, you can include the API Key in the URL when you send data into Cognito Forms. Add 

?access_token=apikey

 to your URL and make sure to replace 

apikey

 with your key.

For example, if you want to send data from one form to another, you can pass the API Key into the ‘Create Entry POST URL’ (ex: 

https:// www .cognitoforms.com/api/forms/__/entries?access_token=APIKey

) and insert it into Submit Entry Endpoint under your form’s JSON settings.

 

Br,
Anders

 
Posted : 01/10/2024 5:15 pm
(@pietc)
Posts: 88
Estimable Member
Topic starter
 

Hi Anders,

Thanks for the reply and sorry for the late response - I've been offline for a while.  Unfortunately, this doesn't hep and Cognito Forms have now confirmed that their API doesn't support getting all the current form entries in a single hit, which is what I wanted to do.  Instead, I have to export the Entries workbook and then use PQ to extract the data from the workbook, which is what I'd hoped to avoid.  I wanted my cleints to be able simply to Refresh All and for the connector to update the data, without someone needing to ferform a manual export first.

They've logged a Tech Support ticket for me to enable this function which is, I feel, a pretty basic request.

Thanks again,

Pieter

 
Posted : 08/10/2024 7:27 am
Share: