Search code examples
orocommerce

ApiKey response api/login Orocommerce


I am getting the apikey that generates the /api/login, but that apikey I don't see how to use it in the other endpoints since in the Docs it talks about making request with the OAuth2.

https://files.slack.com/files-pri/T11NA9FSN-F03CMAN5H6X/captura_desde_2022-04-22_15-38-11.png


Solution

  • In case you need to use generated via "api/login" method API key in the scope of Sandbox you should:

    • generate API key via "api/login" method by passing login and password of customer user
    • sign in with the same user or just refresh Sandbox page, in case you already signed in enter image description here
    • after authentication method will be changed to WSSE (in case if it is still session switch it manually) enter image description here
    • after WSSE will be used for every call enter image description here

    In case you need to use WSSE authentication from code please see the next article (especially "Header Generation" part): https://doc.oroinc.com/api/authentication/wsse/