Shopware 6 provides a REST API, which uses a token that expires every 10 minutes.
When running manual API tests using PhpStorm this is annoying. How can this be done more efficiently?
Shopware 6 provides a REST API, which uses a token that expires every 10 minutes.
When running manual API tests using PhpStorm this is annoying. How can this be done more efficiently?
Copyright © 2021 Jogjafile Inc.
PhpStorm can run multiple requests. We first define the client id and client secret in the Shopware 6 admin panel. Next we use this to obtain the short live token and then execute our request.
Create a new
test.httpfile in PhpStormInsert the following:
Under the menu "run with" define a new environment
Add you integration under System -> Integration in the Shopware Admin panel
Add the
baseurl, theclient_idand theclient_secretto the environment:Execute the request
By adding the variables to the environment, you can also commit your
test.httpfile to adevfolder or similar in your version control system to share it with other developers.