Credentials

class valueserp.Credentials(api_key: str)

Represents the credentials (API key) used to connect to VALUE SERP.

The object offers a validate() method to check that credentials work before using them to access the API.

Parameters:

api_key – A consumer API key provided by VALUE SERP.

api_key

A consumer API key provided by VALUE SERP.

validate() bool

Validates the provided API key.

This works by making a request to the account API endpoint (no cost), and raising an error if the request is unsuccessful.

Returns:

True if the API key is valid.

Raises:

InvalidCredentialsError – The credentials are not valid.