We recommend using the SACD contract via Login with DIMO, which provides you with the most convenient path to building your application and having vehicle owners share permissions with your app.
Service Access Contract Definition (SACD), is a permission management solution for any ERC-721 token (NFT) on the DIMO Network. Designed to manage permissions for the Vehicle NFT, the contract is versatile to support other NFT assets. Permissions set will be attached to the asset, and will override any existing permissions for the same grantee.
{"specVersion":"1.0","id":"f2b5a9ae-b4ba-474c-bd8b-18477b154185","type":"org.dimo.permission.grant.v1","datacontentype":"application/json","time":"2024-11-15T22:42:03.335Z","data": {"templateId":"f2b5a9ae-b4ba-474c-bd8b-18477b154185","version":"1.0","grantor":"0x0EF5d70312e535d2d23494b6b5D3f57d7024A896","grantee":"0x20267f71121f1827680B7796746da135bFcf612D","scope": {"permissions": ["ALLTIME_LOCATION: access to the vehicle full location history.","NONLOCATION_TELEMETRY: non-location vehicle data such as fuel levels and odometer.","COMMANDS: ability to send commands to the vehicle such as lock and unlock.","CURRENT_LOCATION: access to the vehicle current location.","CREDENTIALS: access to any stored credentials and attestations such as insurance and service records." ] },"effectiveAt":"2024-11-15T22:42:03.335Z","expiresAt":"2062-12-12T05:00:00.000Z","attachments": [], "description": "By proceeding, you will grant data access and control functions to dimo-driver effective as of 1731710523335 until Tue Feb 03 1970 22:45:25 GMT+0000 (Coordinated Universal Time). Permissions being granted: ALLTIME_LOCATION: access to the vehicle full location history.; NONLOCATION_TELEMETRY: non-location vehicle data such as fuel levels and odometer.; COMMANDS: ability to send commands to the vehicle such as lock and unlock.; CURRENT_LOCATION: access to the vehicle current location.; CREDENTIALS: access to any stored credentials and attestations such as insurance and service records.Driver ID: 0x0EF5d70312e535d2d23494b6b5D3f57d7024A896 App ID: 0x20267f71121f1827680B7796746da135bFcf612DDIMO Platform, version 1.0."
}, "com.dimo.grantor.signature": "0x01845ADb2C711129d4f3966735eD98a9F09fC4cE57b7c15fd40641dd0d5f7a5a406c138c3da9e749c8f03ae9be8d449ef0895a8f8960cae22a8f2b0af05aa4e3b419f4a0e50bdb1ecd58669384930340a22da38d541c"
}
Usage
To utilize SACD and get permissions to DIMO-connected vehicles from end users, you can take one of the following approaches: