> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Give keys to identifier

> Give vehicle keys to a player identifier server side.

```lua Export theme={null}
exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, type)
```

### Parameters

| Name         | Data Type         | Description                                                                                              |
| ------------ | ----------------- | -------------------------------------------------------------------------------------------------------- |
| `identifier` | string            | The target player identifier/license                                                                     |
| `plate`      | string            | The vehicle plate                                                                                        |
| `type`       | string (optional) | The vehicle type. Defaults to `"temporary"`. Available types: `"temporary"`, `"owned"`, `"other_player"` |

## Example

```lua theme={null}
RegisterNetEvent("vehicle_shop:playerBoughtVehicle", function(playerId, plate)
    local xPlayer = ESX.GetPlayerFromId(playerId)
    local identifier = xPlayer.identifier

    exports["vehicles_keys"]:giveVehicleKeysToIdentifier(identifier, plate, "owned")
end)
```


## Related topics

- [Server](/vehicles-keys/server/index.md)
- [Remove keys from identifier](/vehicles-keys/server/remove-keys-from-identifier.md)
- [Get identifier keys](/vehicles-keys/server/get-identifier-keys.md)
- [Give keys to player ID](/vehicles-keys/server/give-keys-to-player-id.md)
- [How to give keys with /car command](/vehicles-keys/how-to-give-keys-with-car-command.md)
