AppMachine Help Center

How can we help you?


Setup Basic Authentication for your Web Service

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;

How To

  1. Go to and login;
  2. Select an existing app or create a new app;
  3. Click the "Add block" button;
  4. Select the "Pro" tab;
  5. Select the "Web Service" block and click "Add Block";
  6. Click "Custom Web Service";
  7. Enter the URL of your Web Service;
  8. 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.
  9. 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;
  10. You will see that the number of fields you will have to fill out will be reduced to just Three;
  11. First we will give the Authorization Provider a recognizable name;
  12. Next, enter the Username and Password;
  13. 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.
  14. Click "Finish";
  15. Select the Authorization Provider you've just created;
  16. Click "Go";
  17. We will perform a test call using the specified credentials, and when successful you can finish the Web Service integration;


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


  • Avatar
    Remco Boerma

    Thanks, is the user capable of storing the username and password?

  • Avatar
    Matthijs Koopman

    Yes, if you disable the option "Use my credentials in the app" the app will prompt the user to enter their username and password. Those will be stored locally and will be used to access your REST Service. The moment your service starts returning HTTP Error 401 - Unauthorized we will discard the credentials and prompt the user to enter their credentials again.

    Please note, this feature is not yet available, but will be available in the next update, probably this week.

  • Avatar
    Khoi Nguyen

    this method does not work with username for parse (which is email) and password. I get "an error occurred while executing the web service"

  • Avatar
    Werner Bisschoff

    Khoi, I've gotten past that issue... You have to Decode the E-mail on the Server side, because the URL query is being Encoded when sending.

  • Avatar
    Ben Goosse

    Dear Matthijs,

    I've tried your solution. But it doesn't seem to work. The credentials do not get discarded and I 'm not prompted to enter my credentials again.

    Was this implemented?