Geolocation Reward
Easily integrate location-based rewards into your app. This template verifies user presence at specific locations using a set of given coords and automatically issues on-chain badges to their web3 account. Perfect for gamification, enhancing user engagement, and promoting exploration.
Use cases
- Geofencing: Determining if a user has entered or exited a specific geographic area.
- Proximity-based rewards: Unlocking rewards or features when users are near specific locations, perfect for gamification, tourism apps, or retail promotions.
- Event check-ins: Verifying a user’s presence at events, meetings, or specific locations, ideal for event management and attendance tracking.
Video Setup
Prerequisites
-
Setup OPENFORMAT
Before you can continue, please complete the following steps to obtain the necessary credentials:
- Go to the OPENFORMAT Dashboard
- Register for an account
- Generate an API Key
- Create a dApp
- Create a Badge (only if required)
-
Receiver Address
You will need the account address for the user you are rewarding e.g.
0xeed12ae3b7cc78ea09ba4cc6e34a997b969ea8e6
Get Started
OPENFORMAT Node Inputs
Add your OPENFORMAT API Key
, dApp ID
, Badge Name
and Private Key
into
the Reward Badge Node inputs.
Test Integration
To test the integration, click on Test and add the latitude
and longitude
of your user’s current location, the distance
(in kilometers) to check if the user is near the target location, and the receiver
to the body of the request. For example:
Node Inputs
Reward Badge
Key | Description |
---|---|
API Key | Your OPENFORMAT API Key. You can find this in the Settings page of the Dashboard (String) |
dApp ID | The ID of your OPENFORMAT dApp. You can get this in the Dashboard (String, max 32 characters) |
Private Key | The Private Key of your web3 account. You can find this in the Settings page of the Dashboard. |
Badge Name | The name of the badge that you are awarding, this must exactly match the name of the badge created. You can create a badge in the Dashboard. (string) |
Receiver | The address of the receiver, which will be the existing web3 account or the newly generated account. |
Await | Wait for the transaction to be confirmed on the blockchain. (Boolean, default: true) |