Make a whish, get a scope
A scope is like an authorization to get a specific resource.
For example, at Xee we provide different things:
- User info
- Car info
- Signals data (from a Car)
- Trips
- Locations
- ... A lot more
If you build an app that does not need to access trips, then, why should you need to access it ? You just don't. So we wont provide your app the resource, even if you try to call the API
Right, at this point, some of you might be like:
Wait, why wouldn't I ask for every scopes ? I does not cost anything, even if I don't call the API
You're right.. You might, but be aware our authentication system will show the user every scope you're asking for. So, asking more than needed might not be the right thing to do.
| Data you want | API that provide | scope needed |
|---|---|---|
| Read user info | /users/me/users/{userId} |
users_read |
| Read car info | /users/{userId}/cars/cars/{carId} |
cars_read |
| Get car trips | /cars/{carId}/trips/trips/{tripId} |
trips_read |
| Get signals from car | /cars/{carId}/signals/trips/{tripId}/signals |
signals_read |
| Get locations from car | /cars/{carId}/locations/trips/{tripId}/locations |
locations_read |
| Get status of a car | /cars/{carId}/status |
status_read |