Filipe Lourenco : API (Postman) for check domain data (checker)

Tools:

Postman

https://www.postman.com/

Access to Monsido’s Backend Admin platform

https://partner.staging.monsido.com/

When using API each domain contains an authorisation token, this token is called Bearer token.
The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources: Authorization: Bearer <token>
Info about the Bearer token

How to get the Bearer token:

  1. Under the Monsido’s Backend Admin platform the user should access the Request checker and instantly open the browser’s console network tab

  2. After the user should place the domain in the search field and start the domain check.
    within the browser’s console, there will be to calls generated and in one of that calls should contain the info needed (scans)

  3. Under the Headers field, we are able to obtain the type of the API call and the Request URL, that will also be used and in the Request Headers the Bearer token for the domain
    Should look something like this:

    eyJraWQiOiI2MDQzNmJjOTVlYTI3NzA2MTI2NjAyOGI1ZDg2NGI5ODdhNWE1NzQ4YzVkMDRhZWE1MjRkOTM1YzdlMDQ2OWZhIiwiYWxnIjoiSFM1MTIifQ.eyJpc3MiOiJsb2dpbi5tb25zaWRvLmNvbSIsImlhdCI6MTY5MTczNTU5MSwianRpIjoiZTEwZGRhODQtZDFiMS00ZTA0LTlmZDktN2QyZTY5YTk0ZDUxIiwic3ViIjo1MTQ1LCJ1c2VyIjp7ImlkIjo1MTQ1LCJlbWFpbCI6ImZpbGlwZS5sb3VyZW5jb0BjaXZpY3BsdXMuY29tIiwiZmlyc3RfbmFtZSI6IkZpbGlwZSIsImxhc3RfbmFtZSI6IkxvdXJlbmNvIiwiYmFja2VuZF9hZG1pbiI6dHJ1ZSwibGF0ZXN0X2xvZ2luX2F0IjoiMjAyMy0wOC0xMVQwNjozMzoxMVoiLCJzdWRvIjpmYWxzZSwib3RwIjpmYWxzZX0sInNjb3BlcyI6WyJyZXNlbGxlciIsInJlc2VsbGVyX2FkbWluIiwiYWRtaW4iXSwiZXhwIjoxNjkxNzcxNTkxfQ.S79qBzxqC2hRvflnDyNVSiPdRrM8FBYPPl_IodXxSgsALFGkS13HcB9TFIiGU9PfnbAP0Jab86qRZmvUwzIxQg

bearer_token.webm

Using Postman:

How to use the API in Postman

This section gives instructions on how to use the API token in Postman.

  1. Get the API token as per the instructions above.

  2. Copy the token as per the instructions above.

  3. Open Postman.

    1. Create a new Request.

    2. Select the Authorization tab.

    3. Type: Select Bearer Token.

  4. After the Bearer token be set we will need to set the type of the API call and the Request URL

  5. Under the body tab, the user will need to set the scan configuration payload so that the data can be transferred and displayed.
    {"url": "https://URL", "enable_javascript": true, "js_rendering_service": "puppeteer_service", "accessibility": "WCAG22-AA"}
    To set up should in the raw field (optional) and JSON

  6. Send the request as final step.

video-convert-1691750289734.webm