user2147736

Magento API Integration

Discussion created by user2147736 on May 22, 2018
Latest reply on May 24, 2018 by user2147736

I am looking for some help with the API integration with Magento. I have been reading and testing some things. I have gotten to the point of getting a token from Magento using the insert from URL.

 

URL =  "http://192.168.5.87/magento2/rest/V1/integration/admin/token"

CURL =

" -X POST

  -H \”Cache-Control: no-cache\”

  -H \”content-type: application/json\”

-F \"username=magadmin\"

  -F \"password=xxxxxxx\""

 

This sends back a token, good for 4 hours.

 

 

I also have a Access Token from Magento integration. When I use that token in Postman I can pull down products. When I try and use that same info to pull to FM I get an error. Any help would be appreciated.

 

This is the cURL that I get from Postman. How do I modify that for FM?

 

 

curl -X GET \

  http://192.168.5.87/magento2/rest/all/V1/products/123 \

  -H 'Authorization: Bearer <mytoken>' \

  -H 'Cache-Control: no-cache' \

  -H 'Content-Type: application/json' \

  -H 'Postman-Token: <postmantoken>'

Outcomes