I am facing and issue while requesting a cab through Uber Api with Python. These are the steps I have followed :
- Creating a session with my server_token.
- Authorizing with my credentials.
- Got authorization_url and user authentication is done.
- Created an object with a session I got from user authentication.
Got the credentials using the method :
credentials = new_session.oauth2credential
Estimation for the ride :
estimate = client.estimate_ride(product_id=PRODUCT_ID, start_latitude=xx.xxx, start_longitude=xx.xxx, end_latitude=xx.xxx, end_longitude=xx.xxx)
Fetching fare Amount :
fare = estimate.json.get('fare')
I try to request a ride with below code and get the exception :
response = client.request_ride(product_id=Product_ID, start_latitude=xx.xxx, start_longitude=xx.xxx, end_latitude=xx.xxx, end_longitude=xx.xxx, fare_id=fare.get('fare_id'))
Exception :
ClientError: 401: This endpoint requires at least one of the following scopes: request.delegate.tos_accept, request, request.delegate
Please let me know where am I going wrong. Did I miss any step ?
Thanks in advance.