I recently needed to provide access to a third party’s SaaS system to integrate Sage (the guys at Internetware have a solution for this, and their office happens to be just around the corner from ours!) for a client’s store. To do this, I needed to create an API user account in the client’s Magento 1.6 installation.
Cunningly, the terminology in Magento doesn’t quite line up here, so looking for API users doesn’t work! I found the solution hinted at in the Magento forums, which was enough to point me in the right direction.
1. Create a Web Services User Role
The first step to create an API user account for your Magento store is to create a Web Services user role within your store. Go to System > Web Services > Roles in your Magento admin panel (and be sure to select your store from the Scope configuration drop-down on the left hand side of the screen). First of all, enter the Role Name in the first tab (I’ve used “API user (Internetware)” to help give me a heads up on what it’s for in the future):
Next, select the Role Resources tab to the left, and select the relevant Resource Access for this user role (not: we’re assigning rights to the role, not a specific user account here). In this walkthrough, I’ve select the All value:
Now click Save Role in the top-right of the screen to save this Web Services User Role.
2. Creating the Web Services user in Magento
Next up, go to System > Web Services > Users, and click the Add New User button (top-right). Fill in the form that appears (as in the screenshot below), with the API Key and API Key Confirmation fields being used to enter (and confirm) your desired password for access:
Ensure that the “This account is” field is set to Active! Now select the User Role tab to the left, and ensure the new user account you’re creating is assigned to the User Role we created in step one.
Click Save User and you’re ready to go!