# Login Webhooks

Login verification allows you to integrate your own authentication layer into your webstore. Once you have set up player verification the webstore will ping an endpoint hosted on your own website with information about the player attempting to log in. Depending on your response you can deny/allow the customer from logging in.

The login verification system opens up a whole new world of opportunities for integrating with your own backend systems.

{% hint style="info" %}
**Please only use this feature if you know how to use it, incorrectly using this system (such as using a Discord webhook) will prevent customers from logging in to your store.**&#x20;
{% endhint %}

## How To Setup Player Verification

1. Go to **Webhooks**.&#x20;
2. Enter the full URL of your endpoint in the login webhooks config box, for example, <http://example.com/tebex/verification.php>. You can use any programming language to create your endpoint as long as it returns the response as listed below.

## Accepting Notifications And Returning A Response

### Example Request

When a customer attempts to log in to your webstore we will send a GET request to the URL you have previously set as outlined above. An example request URL would \
look like the following:\
​

```
http://example.com/tebex/verification.php?ign=Notch&ip=127.0.0.1&country=US
```

\
**Request Query Parameters**

1. **ign** - The username of the customer attempting to log in.
2. **ip** - The IP address of the customer attempting to log in.
3. **country** - The country code of the customer (Based on GEO locating their IP address).

### Example Response

To allow the customer to log in based on the provided query parameters you need to return a JSON response such as the following example:\
​

```
{  
    "verified":true,
    "message":"An optional message to send to the customer upon login. This field is optional."
}
​
```

​\
If you don't want to allow the customer to login you can return a JSON response such as:\
​

```
{
    "verified":false,
    "error":"You are not allowed to access our webstore."
}
​
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tebex.io/developers/webhooks/login-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
