Magento – How to use Magento 2 API

apimagento2magento2.1.6rest

Trying to integrate magento 2.0 with a desktop application (i.e the desktop application should be able to create products & download orders) using the REST API.

I am trying to make a 'POST' call to Magento 2.0 token request to get the access token, however, I am getting an error while sending the request:

oauth_problem=Consumer+key+has+expired.

I am trying to generate the signature using:

POST http://xxxxxx/magento/oauth/token/request?oauth_nonce=cyzHawrmnCYz7cJT&oauth_signature_method=HMAC-SHA1&oauth_time

I have been trying to implement rest API.
may be, can I try SOAP if rest API did not work out. really confusing
which is advisable to use? REST or SOAP based
I am using bitnami Magento 2.1.6. bitnami is like a library which takes over of wamp,Magento installation as a package. is that okay to use or separation installation is best?

Help needed.

Best Answer

Try to recheck the official documentation step by step :

Token based with Magento admin user/pass: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html

For OAUTH : http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-oauth.html

You can test it on a local environment to be sure bitnami is not the root cause.

Thanks,

Related Topic