Skip to content

Commit

Permalink
Switch to Oauth access token for streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Nov 12, 2020
1 parent c501c07 commit 8b63116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tesla_api/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def stream(endpoint: Stream.streaming_endpoint, &receiver)

def streaming_connect_message
{
msg_type: 'data:subscribe',
token: Base64.strict_encode64("#{email}:#{self['tokens'].first}"),
msg_type: 'data:subscribe_oauth',
token: client.access_token,
value: 'speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,range,est_range,heading',
tag: self['vehicle_id'].to_s,
}
Expand Down

0 comments on commit 8b63116

Please sign in to comment.