# signature.php

## Verifies a signed message

<mark style="color:blue;">`GET`</mark> `https://solpay.solblaze.org/signature.php`

The signature endpoint takes in three parameters: address, message, and signature. The address parameter is for the signing address, the message is for the text which was signed, and the signature is for the signed message (which can be obtained through [sign-message](https://solpay-docs.solblaze.org/reference/sdk-reference/sign-message "mention")). The endpoint returns whether the signature is valid.

#### Query Parameters

| Name                                        | Type   | Description     |
| ------------------------------------------- | ------ | --------------- |
| address<mark style="color:red;">\*</mark>   | string | signing address |
| message<mark style="color:red;">\*</mark>   | string | original text   |
| signature<mark style="color:red;">\*</mark> | string | signed text     |

{% tabs %}
{% tab title="200: OK success - the signature is valid" %}

```javascript
{
    "status": "success",
    "verified": true
}
```

{% endtab %}

{% tab title="200: OK success - the signature is invalid" %}

```javascript
{
    "status": "success",
    "verified": false
}
```

{% endtab %}

{% tab title="200: OK error - missing parameters" %}

```javascript
{
    "status": "error",
    "error": "Missing parameters, endpoint requires the following fields: address, message, signature."
}
```

{% endtab %}

{% tab title="200: OK error - maintenance mode" %}

```javascript
{
    "status": "error",
    "error": "SOL Pay is in maintenance mode, please try again in a few minutes."
}
```

{% endtab %}

{% tab title="200: OK error - extended maintenance mode" %}

```javascript
{
    "status": "error",
    "error": "SOL Pay is in extended maintenance mode, please try again later."
}
```

{% endtab %}

{% tab title="200: OK error - unknown" %}

```javascript
{
    "status": "error",
    "error": "An unknown error occurred, please try again in a few minutes."
}
```

{% endtab %}
{% endtabs %}

### Example Request:

```
https://solpay.solblaze.org/signature.php?address=SIGNING_ADDRESS&message=MESSAGE&signature=SIGNATURE
```
