access token

65 views
Skip to first unread message

german...@eamsw.com

unread,
Jul 26, 2016, 2:12:19 PM7/26/16
to Zengine Development
hello Zengine,

I'm new to zengine have some trouble with the use of access token. In the documentation it says I need to register my application by creating a user and it'll retrieve an api key and
access token but doesn't it require an access token to create a user in the first place? Also another question I have is how do I insert multiple rows from a single POST request. My creating a grants management system and have dynamic changing text fields that I need to insert.

Thanks!

Anna Parks

unread,
Jul 26, 2016, 3:31:18 PM7/26/16
to Zengine Development, german...@eamsw.com
Hi there,

Thanks for the feedback on the documentation. The wording is a little unclear. You can create a user by signing up for Zengine. Then you can get an access token by going to the developer section in Zengine. Using that access token, you can get information (like the id) about your newly created user by querying https://api.zenginehq.com/v1/users/me. Once you have your user id and an access token, you can create your own API Client. This API Client can then be used to generate access tokens.

If you want to save multiple resources in one request, you can send a POST with an array of JSON objects in the request payload. For example, if you are inserting 3 records at once to the form 123, send a POST to https://api.zenginehq.com/v1/forms/123/records with a request payload that looks something like this:

[
   {
"field123": "record 1 - text input value 1",
"field456": "record 1 - text input value 2" 
   },
   {
"field123": "record 2 - text input value 1",
"field456": "record 2 - text input value 2"
   },
   {
"field123": "record 3 - text input value 1",
"field456": "record 3 - text input value 2"
   }
]

Hope that helps!

- Anna 
Reply all
Reply to author
Forward
0 new messages