API3
jobhorvers at November 18th, 2020 06:10 — #1
Goodafternoon,
We are currently setting up a pipeline in MS Azure Datafactory to retrieve data from OnePageCRM to a SQL database using the OnePage API.
We manage to use Postman to retrieve all data via an HTTP request. However, when we use exact same parameters to retrieve the data in Datafactory, we receive a 404 error (not found). All settings are equal so it seems.
As a new user I am not able to share mij screenpictures. Are there specific parameters that need to extract data from OnePage to Datafactory?
Thanks for your help in advance!
Regards,
Job Horvers (The Netherlands)
vladimir at November 24th, 2020 14:32 — #2
Hi @jobhorvers!
Thanks for your question. Please check the following items:
You're sending your request to a valid endpoint, i.e. GET https://app.onepagecrm.com/api/v3/contacts.json
You're providing a valid Authorization header. i.e. it's value should be 'Basic {base64 encoded value}'. You can read here https://developer.onepagecrm.com/api (see Authentication section) how it can be generated. Generally it is a based64 encoded combination of user ID and user API key, combined with a colon character.
See the following example (in ruby):
joined_data = [user.id, user.api_key].join(':')
your_value = Base64.safeurl_encode64 joined_data
Now you can create Authorization header: "Basic #{your_value}"
Usually users may get 404 Not Found error when they didn't log into their account or provided a wrong contact ID, so the contact wasn't found in the given account.
I hope that helped, if you any questions please feel free to ask them
Thanks,
Vlad
Powered by Discourse, best viewed with JavaScript enabled