BigCommerce API. What is the syntax of an url string that would allow me to download orders in xml?

混江龙づ霸主 提交于 2019-12-13 09:54:37

问题


BigCommerce API. What is the syntax of an url string that would allow me to download orders in xml? Can I embed the login credentials in the string and post as https get or do I need to post them as xml? I have tried different variations of username, api_key, api_toke and inserted them in the url string but I keep getting error messages.


回答1:


To answer your question: No, you cannot send your credentials in the URL. It's doubtful that such a thing would retain the PCI compliance of your store.

You would need to send your user credentials (username and API key) via HTTP headers with something like CURL. Technically you can do this with AJAX but thats a huge security risk so you have to process the request server side.

If you want to test if you can actually make a connection try this: http://www.hurl.it/

URL: site_url/orders.xml
GET
HTTP Basic Auth ->
Username: Bigcommerce username
Password: API Key

This should return a result.



来源:https://stackoverflow.com/questions/16552731/bigcommerce-api-what-is-the-syntax-of-an-url-string-that-would-allow-me-to-down

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!