apps_n_analysis at August 19th, 2014 16:08 — #1
We're new to OnePage and are looking to integrate the api in to a mobile app to create a new contact and add an action to that contact effectively as one transaction.
Could anyone advise what is the best way to go about this including any authorisation we need to pass.
pete_onepagecrm at August 20th, 2014 10:38 — #2
Hi Alex, thanks for getting in touch.
What language are you planning to write the mobile app in, is it a HTML5 app or Android / iOS?
The signing process is detailed here - http://developer.onepagecrm.com/#signing
We have some code snippets to help you with that, depending on your language.
After that you'll need to make fairly simple
POST calls to the
You can browse our API (
GET requests only ) with our API Browser, and this should give you a better idea of the data structure.
Let us know how you get on and be in touch if you have any questions.
pete_onepagecrm at August 20th, 2014 12:22 — #3
@ruairi do you have some iOS code samples you could dig out for Alex?
ruairi at August 20th, 2014 12:49 — #4
Here is information on how to sign the requests.
There is a sample of how to do this with objective c in there too.
I built part of an iOS app before and the requests were carried out using the RESTKit library
I've put together a sample below but as I no longer has an iOS dev environment can't be sure if it works or not.
It currently takes 2 POST requests to create a contact with an action.
The first request is to /api/v3/contacts.json
The second is to /api/v3/contacts//actions.json
The contact id is obtained from the first POST.
Good luck with it and we hope you get on OK.
If you need any more help don't be afraid to ask.
flint at February 6th, 2015 17:37 — #5
Having trouble creating an action for a new contact; I'm getting "A validation error has occurred", so the error must be in my post. I'm writing in php, and posting to "actions.json?contact_id=$contactId"
$postData = array(
pete_onepagecrm at February 9th, 2015 10:09 — #6
Hi @flintFirstly, are you using the php sample code we've provided? It's the quickest way to get started.
https://github.com/OnePageCRM/php-sampleIf not, can you post a link to your code somewhere?