sagar patil
sagar patil

Reputation: 1

can anyone help me to clear the error occured in uber api

after authorizing the app in python the auth_url is showing invalid scope after getting the url

auth_flow =AuthorizationCodeGrant("Ws4Za7kSxIdQdpxcZnL2WC9L8NVl3UBT","all_trips delivery history history_lite places profile request request_receipt ride_widgets","qccwQVFYdzSIFwD86DIYAJeBB-Wg8KBuXO0mWiNN","http://127.0.0.1/")

http://127.0.0.1/?error=invalid_scope&state=WD7kEksCoCsUap219zzge18MuoxV6bvS#_

Upvotes: 0

Views: 73

Answers (1)

Sasa Jovanovic
Sasa Jovanovic

Reputation: 857

You are not passing the scopes properly, your scope list looks like following after AuthorizationCodeGrant is executed:

scope=a+l+l++t+r+i+p+s+++d+e+l+i+v+e+r+y+++h+i+s+t+o+r+y+++h+i+s+t+o+r+y++l+i+t+e+++p+l+a+c+e+s+++p+r+o+f+i+l+e+++r+e+q+u+e+s+t+++r+e+q+u+e+s+t++r+e+c+e+i+p+t+++r+i+d+e++w+i+d+g+e+t+s&state=0kFxqT7cTka4pbkbdAObpSzrh8mF4pUR&redirect_uri=http%3A%2F%2F127.0.0.1%2F&response_type=code&client_id=Ws4Za7kSxIdQdpxcZnL2WC9L8NVl3UBT

So you will need to do something like this:

auth_flow = AuthorizationCodeGrant( 'XXX', {'all_trips ', 'delivery', 'history', 'history_lite', 'places', 'profile', 'request', 'request_receipt', 'ride_widgets'}, 'XXX', 'http://localhost' )

Upvotes: 1

Related Questions