BMW-i-Remote icon indicating copy to clipboard operation
BMW-i-Remote copied to clipboard

Has the OAuth scope changed?

Open vaizki opened this issue 8 years ago • 5 comments

Just started looking into this API as a new i3 owner. The OAuth token retrieval does not seem to accept "remote_services vehicle_data" as a valid scope:

% curl \
   -H "Authorization: Basic yes-i-fished-it-out-from-the-apk==" \
   -H "Content-Type: application/x-www-form-urlencoded" \
   -d "grant_type=password&username=me%40my.email&password=verysecret&scope=remote_services+vehicle_data" \
   "https://b2vapi.bmwgroup.com/webapi/oauth/token/"

and I get the result:

{
  "error" : "invalid_scope",
  "error_description" : "The requested scope is invalid, unknown, or malformed."
}

Also tried with other scope values (such as authenticate_user) but no luck. If I leave the scope parameter out, I am granted an access_token with scope=journey_mate but it cannot be used to access the API, resulting in an error:

% curl -H "Authorization: Bearer magic-token-here" "https://b2vapi.bmwgroup.com/webapi/v1/user/vehicles/"
{"error":"invalid_token","error_description":"The access token provided is expired, revoked, malformed, or invalid for other reasons."}

Am I doing something wrong here or has the API structure changed? The journey_mate scope is a clear reference to the Mini app..

vaizki avatar Nov 23 '17 10:11 vaizki

Any luck on this, @vaizki? I have the same problem.

VeitWeber avatar Apr 17 '18 12:04 VeitWeber

Sorry I have not had time to spend on this.. it looks like they are actively redoing the API with new versions of CD and exposing parts of it directly to the web clients .. thanks for reminding me, I'll try to spend an hour on this soon.

vaizki avatar Apr 17 '18 13:04 vaizki

I have the same problem. Getting the following result on ubuntu: {"error":"invalid_client","error_description":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)."}

thl-mot avatar Jun 19 '18 16:06 thl-mot

Sadly I don't have an i3 any more. I can take a look if someone wants to buy me one (😂).

edent avatar Jun 19 '18 17:06 edent

Same issue here as with @thl-mot

ipv6freely avatar Jul 02 '18 20:07 ipv6freely