template configure custom API to miniorange

  • Click here and login with your miniOrange account.
  • Navigate to User Stores and click on the Add User Store button.
    wordpress as api authentication source add user store
  • Switch to the API tab and select Custom API from the dropdown.
    wordpress as api authentication source api configuration
  • Provide an API identifier name.
  • Under the Authentication Configuration section, paste the User Authentication URL that you copied in step 1 above.
  • You can pass API key via two different methods i.e. Request Header or Request Body.

In this method, The API key is sent as "Authorization_key" via request header. You can refer to the example below.

  • Provide the Header Name Authorization_key and its value i.e. Value of your API key that you copied in step 1.
  • Select the Method as GET.
  • Provide the Authentication Parameters as:
    Authentication Parameters {
    "username":"##username##",
    "password":"##password##"
    }
    Note: Extra parameters can be sent in the Authentication parameters section if required. These parameters are added in the format "parameter-name":"parameter-value".
  • API Authentication Configuration Example with API key in header
  • Provide the Status field’s value as status and Status Message field’s value as message.
    Status Name of field in the server response that contains the status code
    Staus Message Name of the field that gives the description of the status in the response

In this method, The API key is sent as "api_key" parameter in the POST body as JSON.

To configure your provider to send API key as a field in request body, you can refer below.

  • In the headers section, provide the Header Name Content-Type and its value application/json.
    (The content-type in the header specifies what type of data is actually sent in the request. Some examples of Content-type can be: application/json; text/html; charset=UTF-8; multipart/form-data; text/plain, etc.)
  • Select the Method as POST.
  • Provide the Authentication Parameters as:
    Authentication Parameters {
    "api_key":"value",
    "username":"##username##",
    "password":"##password##"
    }
    Put the API key value that you copied in step 1 in place of 'value'.
    Note: Extra parameters can be sent in the Authentication parameters section if required. These parameters can be added as fields in request body in the format "parameter-name":"parameter-value".

  • api authentication source user authentication parameters
  • Provide the Status field’s value as status and Status Message field’s value as message.
    Status Name of field in the server response that contains the status code
    Staus Message Name of the field that gives the description of the status in the response