Javascript API - Basic Introductory Example? I can't get any examples to work
Can anyone on this forum that has got the javascript (ajax) API to work on a WA page give me a simple working example? Of anything.
The https://gethelp.wildapricot.com/en/articles/1705-working-with-api-from-javascript does not work (its clearly missing a lot of guidance)
I've tried Dmitry's examples and they do not work for me.
I've tried both my Account ID and an app api key in all examples.
I do get the excel spreadsheet example to work.
Any assistance would be greatly appreciated!
-
Jack Kerkhof commented
I solved this myself. Here is the solution:
The documentation is missing the very important guidance that the "APPLICATION_CLIENT_ID" is not a literal, but should be replaced by an id that we create in the "App" Admin page.
So take the example on the "working with api from javascript" and modify the code:
- use your accountID
- use a application client id that you created in Admin->Apps.Also beware the API returns a sucess code if you make the above mistake. The code is missing a return value that indicates an error when this literal is provided.
Hope this helps