Skip to main content
AI agents are now live in Website Scanner! Enter your URL and fix website issues 3x faster with AI. Explore now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Create auth config API in Website Scanner

Use this API to set up basic or form authorization for your website scans.

You can create two types of auth configs:

  • form auth
  • basic auth

create auth config for form auth

For geo-restricted data, use the following endpoints:
https://accessibility-eu.browserstack.com/api/website-scanner/v1/auth_configs (European Union)
https://accessibility.browserstack.com/api/website-scanner/v1/auth_configs (United States)
https://accessibility-in.browserstack.com/api/website-scanner/v1/auth_configs (India)

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
     -X POST "https://api-accessibility.browserstack.com/api/website-scanner/v1/auth_configs" \
     -H "Content-Type: application/json" \
     -d '{
       "authData": {
         "password": "user",
         "passwordSelector": "user",
         "submitSelector": "ack",
         "url": "https://sampleurl.com",
         "username": "somo",
         "usernameSelector": "somo"
       },
       "name": "sample_auth_config",
       "type": "form"
     }'

Response Attributes 200 OK JSON

Response

{
    "success": true,
    "data": {
        "id": 16,
        "name": "sample_auth_config",
        "type": "form",
        "username": "somo",
        "password": "user",
        "url": "https://google.com",
        "usernameSelector": "somo",
        "passwordSelector": "user",
        "submitSelector": "ack"
    }
}

create auth config for basic auth

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
     -X POST "https://api-accessibility.browserstack.com/api/website-scanner/v1/auth_configs" \
     -H "Content-Type: application/json" \
     -d '{
         "name": "sample_auth_config1",
         "type": "basic",
         "authData": {
             "url": "https://sampleurl.com",
             "username": "somo",
             "password": "user"
         }
     }'


Response Attributes 200 OK JSON

Response

{
    "success": true,
    "data": {
        "id": 16,
        "name": "sample_auth_config1",
        "type": "basic",
        "username": "somo",
        "password": "user"
    }
}

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle