These steps below show how to use an admin user to get an API authentication and how to use it.
But you can find all APIs URLs accessing this URL on your store:
www.yourstore.com.br/swagger/
To see all administrator methods (not only the guest methods), you can paste the api_key on the top right of the page and click to apply, this api_key is the key returned in step 1 below.
Step-by-Step
1 - Get your authentication token if this command, the token no expiry it just can be invalidated. Change the ADMIN_USER and PASSWORD_USER to yours.
curl -X POST \
http://yourstore.com/rest/default/V1/integration/admin/token \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"username": "ADMIN_USER",
"password": "PASSWORD_USER"
}'
2 - To check your connection you can get the list of the installed modules using this command below.
You must change the XXXXXX_TOKEN_HERE_XXXX to use your token returned in step 1.
curl -X GET \
http://yourstore.com/index.php/rest/V1/modules \
-H 'authorization: Bearer XXXXXX_TOKEN_HERE_XXXX' \
-H 'cache-control: no-cache' \
-d '{
"searchCriteria": {
"currentPage": 0
}
}'