 					let objectString = String.init(data: data, encoding: String.Encoding.utf8) ?? "No Body"
 					logDebug("RESPONSE BODY ERROR: \(objectString)\n", debuggingEnabled: debugEnabled)
 					
-					if let mapped = try? teslaJSONDecoder.decode(ErrorMessage.self, from: data) {
+					if let wwwauthenticate = httpResponse.allHeaderFields["Www-Authenticate"] as? String,
+						wwwauthenticate.contains("invalid_token") {
+						seal.reject(TeslaError.tokenRevoked)
+					} else if let mapped = try? teslaJSONDecoder.decode(ErrorMessage.self, from: data) {
 						seal.reject(TeslaError.networkError(error: NSError(domain: "TeslaError", code: httpResponse.statusCode, userInfo:[ErrorInfo: mapped])))
 					} else {
 						seal.reject(TeslaError.networkError(error: NSError(domain: "TeslaError", code: httpResponse.statusCode, userInfo: nil)))

extension TeslaSwift {
	
	public var isAuthenticated: Bool {
		return token != nil
	}
	
	/**

	case networkError(error:NSError)
	case authenticationRequired
	case authenticationFailed
	case tokenRevoked
	case invalidOptionsForCommand
	case failedToParseData
	case streamingMissingEmailOrVehicleToken
