Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Has the OAuth scope changed? #42

Open
vaizki opened this issue Nov 23, 2017 · 5 comments
Open

Has the OAuth scope changed? #42

vaizki opened this issue Nov 23, 2017 · 5 comments

Comments

@vaizki
Copy link

vaizki commented Nov 23, 2017

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..

@VeitWeber
Copy link

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

@vaizki
Copy link
Author

vaizki commented Apr 17, 2018

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.

@thl-mot
Copy link

thl-mot commented Jun 19, 2018

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)."}

@edent
Copy link
Owner

edent commented Jun 19, 2018

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

@ipv6freely
Copy link

Same issue here as with @thl-mot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants