Not sure if this is the correct area to post but I am having issue with getting past 401 Authentication using Curl with the API.
So these are the steps I did:
1) Created new API token: https://(my store url)/mm5/json.mvc, Allowed IP address: 0.0.0.0/0, ::/0, No signature or timestamp
2) Functions assigned to token: OrderList_Load_Query, ProductList_Load_Query, Time_UTC
3) Under User management->Groups .. my user id is assigned to all groups and all groups have the API token assigned to it.
4) Different Curls I did:
a) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d '{"Store_Code": "[My Store Code]",\ "Function": "Time_UTC"}'
b) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d '{"Store_Code":"[My Store Code]","Function":"ProductList_Load_Query"}'
c) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d "{"Store_Code": "PTS", "Function": "OrderList_Load_Query", "Filters": [{"field": "order_id", "operator": "=", "value": "1018"}]}"
5) have done a bunch of variations with products and orders in retrieving .. keep always getting a 401 Auth error.
Any help will be appreciated.
So these are the steps I did:
1) Created new API token: https://(my store url)/mm5/json.mvc, Allowed IP address: 0.0.0.0/0, ::/0, No signature or timestamp
2) Functions assigned to token: OrderList_Load_Query, ProductList_Load_Query, Time_UTC
3) Under User management->Groups .. my user id is assigned to all groups and all groups have the API token assigned to it.
4) Different Curls I did:
a) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d '{"Store_Code": "[My Store Code]",\ "Function": "Time_UTC"}'
b) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d '{"Store_Code":"[My Store Code]","Function":"ProductList_Load_Query"}'
c) curl -X POST "[My Store Name]/mm5/json.mvc" -H "Content-Type: application/json" -H "Authorization: Bearer [My API Token]" -d "{"Store_Code": "PTS", "Function": "OrderList_Load_Query", "Filters": [{"field": "order_id", "operator": "=", "value": "1018"}]}"
5) have done a bunch of variations with products and orders in retrieving .. keep always getting a 401 Auth error.
Any help will be appreciated.
Comment