Many web services use some kind of authentication method to secure access to the web service. There are a lot of authentication types available, one of which is Basic Authentication. In this How-To we will guide you through the process of setting up Basic Authentication for your Web Service.
- A web service that requires Basic Authentication;
- Go to http://design.appmachine.com and login;
- Select an existing app or create a new app;
- Click the "Add block" button;
- Select the "Pro" tab;
- Select the "Web Service" block and click "Add Block";
- Click "Custom Web Service";
- Enter the URL of your Web Service;
- Now you need to specify the Basic Authentication. AppMachine uses (so called) Authorization Providers to specify any type of authentication that should be used during a Web Service call. So to setup Basic Authentication we need to create a Basic Authentication Authorization Provider. To do so, click the "+" button next to the Authorization provider field.
- A wizard will open. This wizard will allow you to create a new Authorization Provider. First you will need to switch the Type to Basic;
- You will see that the number of fields you will have to fill out will be reduced to just Three;
- First we will give the Authorization Provider a recognizable name;
- Next, enter the Username and Password;
- By enabling the option "Use my credentials in the app" the Web Service will always use the username and password you provided. Otherwise the user will be prompted to enter their username and password.
- Click "Finish";
- Select the Authorization Provider you've just created;
- Click "Go";
- We will perform a test call using the specified credentials, and when successful you can finish the Web Service integration;