---
title: "Test Log In to API"
method: POST
path: "/targets/{id}/check_api_login/"
tags: ["Targets"]
---

# Test Log In to API

`POST /targets/{id}/check_api_login/`

Test the API login configuration by making a login request  
and returning available JSON selectors from the response.  

Supported media types:  
- `application/json`: JSON-formatted payload in request body  
- `application/x-www-form-urlencoded`: Form-encoded payload in URL  
- `application/graphql`: Raw GraphQL query string

## Path parameters

- `id` string, required — A unique Base58 value identifying this object.

## Request body

- APIScanLoginOptions
  - `media_type` 'application/json' | 'application/x-www-form-urlencoded' | 'application/graphql' — Format of the payload: * `application/json` - The payload is in JSON format in the request body. * `application/x-www-form-urlencoded` - The payload is encoded in the request URL. * `application/graphql` - The payload is a raw GraphQL query string.
  - `api_login_url` string — URL to make the authentication request to the API. The maximum length is 2048 characters.
  - `api_login_payload` string — Payload to send in the authentication request. The maximum length is 4096 characters.
  - `api_login_payload_is_sensitive` boolean
  - `api_login_token_field` string — Field containing the authentication token in the response to the authentication request. The maximum length is 256 characters.
  - `token_prefix` string — Prefix to add to the authentication token. For example, "Bearer" or "JWT". The maximum length is 16 characters.
  - `token_parameter_name` string — Parameter name to send the authentication token. For example, "Authorization". The maximum length is 256 characters.
  - `token_parameter_location` 'cookie' | 'header', required — Where to send the parameter name with the authentication token and the prefix: * `cookie` - Cookie * `header` - Header

## Response `200`

- string[]

## Other responses

- `400`
- `401`
- `404`
- `500`

---

[API](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation.md) · [All operations](https://skmtc.net/probely/apis/snyk-api-web-s-api-reference-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/probely/snyk-api-web-s-api-reference-documentation/versions/e29879bff01b/schema)
