# User Approvals

User approvals offer secure methods for verifying wallet or address ownership. There are two primary approaches:

* **Signature Verification:**\
  Verifies ownership without recording any transaction on the blockchain, thus avoiding associated gas costs.
* **Event Verification:**\
  Confirms ownership through a blockchain *event* emitted by a contract. This method incurs a minor transaction cost and leaves an on-chain record.

In both cases, the approval flow remains consistent:

1. **Generate an Approval URL 📄**
2. **Redirect the User to the Approval URL  👉**
3. **Handle the Return URL 🔧**
4. **Lookup the Response to Confirm Approval ✅**

### Example Call Using 'event' Verification

```
// Example Call using 'event' verification
curl --location 'https://kns-api.karrier.dev/kns/approval' \
--header 'x-api-key: testkey' \
--header 'Content-Type: application/json' \
--data '{
  "title": "SIM SWAP",
  "message": "Would you like to deactivate your previous SIM card and activate a new SIM card?",
  "phoneNumber": "+15552221234",
  "successRedirectUrl": "yes/success",
  "cancelRedirectUrl": "no/failure",
  "referenceNumber": "I#23493249243932",
  "method":"event"
}'

{
    "approvalUrl": "https://dashboard.karrier.dev/kns-approve?ref=ea24b697d2730d82c755a5b7",
    "approvalNumber": "ea24b697d2730d82c755a5b7"
}
```

{% openapi src="<https://1343437234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2J36Me8m3Rq5gwWD8Fvi%2Fuploads%2FxyZZSK5cNA1RfsoAFdNT%2Fkns-api-swagger.json?alt=media&token=51b156bd-e60e-4ddc-b707-02db1d5ee46e>" path="/kns/approval-phone" method="post" %}
[kns-api-swagger.json](https://1343437234-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2J36Me8m3Rq5gwWD8Fvi%2Fuploads%2FxyZZSK5cNA1RfsoAFdNT%2Fkns-api-swagger.json?alt=media\&token=51b156bd-e60e-4ddc-b707-02db1d5ee46e)
{% endopenapi %}
