RESOURCES_FILE = ".mercedesme_resources"
# Mercedes me Application Parameters
REDIRECT_URL = "https://localhost"
-SCOPE = "mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
+SCOPE = "openid%20mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
URL_RES_PREFIX = "https://api.mercedes-benz.com/vehicledata/v2"
# Configuration File Parameters
RESOURCES_FILE = ".mercedesme_resources"
# Mercedes me Application Parameters
REDIRECT_URL = "https://localhost"
-SCOPE = "mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
+SCOPE = "openid%20mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
URL_RES_PREFIX = "https://api.mercedes-benz.com/vehicledata/v2"
#UPDATE_SIGNAL = "mercedesmeapi_update"
from .const import *\r
from .query import *\r
\r
-URL_OAUTH_BASE = "https://id.mercedes-benz.com/as"\r
-URL_OAUTH_AUTH = f"{URL_OAUTH_BASE}/authorization.oauth2?response_type=code"\r
-URL_OAUTH_TOKEN = f"{URL_OAUTH_BASE}/token.oauth2"\r
+URL_OAUTH_BASE = "https://ssoalpha.dvb.corpinter.net/v1"\r
+URL_OAUTH_AUTH = f"{URL_OAUTH_BASE}/auth?response_type=code"\r
+URL_OAUTH_TOKEN = f"{URL_OAUTH_BASE}/token"\r
\r
# Logger\r
_LOGGER = logging.getLogger(__name__)\r
CONFIG_FILE=".mercedesme_config"
# Mercedes me Application Parameters
REDIRECT_URL="https://localhost"
-SCOPE="mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
+SCOPE="openid%20mb:vehicle:mbdata:fuelstatus%20mb:vehicle:mbdata:vehiclestatus%20mb:vehicle:mbdata:vehiclelock%20mb:vehicle:mbdata:evstatus%20mb:vehicle:mbdata:payasyoudrive%20offline_access"
RES_URL_PREFIX="https://api.mercedes-benz.com/vehicledata/v2"
# Resources
RES_FUEL=(rangeliquid tanklevelpercent)
if [[ -f "$CONFIG_FILE" ]]; then
. $CONFIG_FILE
fi
-if [ -z $CLIENT_ID ] | [ -z $CLIENT_ID ] | [ -z $CLIENT_ID ]; then
+if [ -z $CLIENT_ID ] | [ -z $CLIENT_SECRET ] | [ -z $VEHICLE_ID ]; then
echo "Please create $CONFIG_FILE with CLIENT_ID=\"\", CLIENT_SECRET=\"\", VEHICLE_ID=\"\""
exit
fi
echo "Open the browser and insert this link:"
echo
- echo "https://id.mercedes-benz.com/as/authorization.oauth2?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URL&scope=$SCOPE"
- #echo "https://id.mercedes-benz.com/as/authorization.oauth2?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URL&scope=$SCOPE&state=$STATE"
+ echo "https://ssoalpha.dvb.corpinter.net/v1/auth?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URL&scope=$SCOPE"
+ #echo "https://ssoalpha.dvb.corpinter.net/v1/auth?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URL&scope=$SCOPE&state=$STATE"
echo
echo "Copy the code in the url:"
read AUTH_CODE
TOKEN=$(curl --request POST \
- --url https://id.mercedes-benz.com/as/token.oauth2 \
+ --url https://ssoalpha.dvb.corpinter.net/v1/token \
--header "Authorization: Basic $BASE64" \
--header "content-type: application/x-www-form-urlencoded" \
--data "grant_type=authorization_code&code=$AUTH_CODE&redirect_uri=$REDIRECT_URL")
from const import *
from query import *
-URL_OAUTH_BASE = "https://id.mercedes-benz.com/as"
-URL_OAUTH_AUTH = f"{URL_OAUTH_BASE}/authorization.oauth2?response_type=code"
-URL_OAUTH_TOKEN = f"{URL_OAUTH_BASE}/token.oauth2"
+URL_OAUTH_BASE = "https://ssoalpha.dvb.corpinter.net/v1"
+URL_OAUTH_AUTH = f"{URL_OAUTH_BASE}/auth?response_type=code"
+URL_OAUTH_TOKEN = f"{URL_OAUTH_BASE}/token"
# Logger
_LOGGER = logging.getLogger(__name__)