Skip to content

Commit

Permalink
Update Fleet API URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Terashima authored and sethterashima committed Aug 8, 2024
1 parent eaf6ee1 commit 6a625f5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ working as vehicles begin requiring end-to-end command authentication. If you
are one of these developers, you can set up the proxy server or refactor your
application to use this library directly. Pre-2021 Model S and X vehicles do
not support this new protocol. [Fleet
API](https://developer.tesla.com/docs/tesla-fleet-api#fleet-api) will continue
API](https://developer.tesla.com/docs/fleet-api/getting-started/what-is-fleet-api) will continue
to work on these vehicles.

## System overview
Expand All @@ -31,7 +31,7 @@ obtain a valid OAuth token from the user, and the user must enroll the
application's public key in the vehicle.

Tesla's website has [instructions for obtaining OAuth
tokens](https://developer.tesla.com/docs/fleet-api). This README has
tokens](https://developer.tesla.com/docs/fleet-api/authentication/third-party-tokens). This README has
instructions for generating private keys and directing the user to the
public-key enrollment flow. The tools in this repository can use the OAuth
token and the private key to send commands to vehicles.
Expand Down Expand Up @@ -77,7 +77,7 @@ The final command installs the following utilities:
* **tesla-http-proxy**: An HTTP proxy that exposes a REST API for sending
vehicle commands.
* **tesla-auth-token**: Write an OAuth token to your system keyring. This
utility does not fetch tokens. Read the [Fleet API documentation](https://developer.tesla.com/docs/fleet-api#authentication)
utility does not fetch tokens. Read the [Fleet API documentation](https://developer.tesla.com/docs/fleet-api/authentication/third-party-tokens)
for information on fetching OAuth tokens.

Configure environment variables (optional):
Expand Down Expand Up @@ -129,7 +129,7 @@ As discussed above, your HTTP proxy will need to authenticate both with Tesla
Tesla's servers require your client to provide an OAuth access token before
they will forward commands to a vehicle. You must obtain the OAuth token from
the vehicle's owner. See [Tesla's
website](https://developer.tesla.com/docs/fleet-api) for instructions on
website](https://developer.tesla.com/docs/fleet-api/getting-started/what-is-fleet-api) for instructions on
registering a developer account and obtaining OAuth tokens.

### Generating a command-authentication private key
Expand Down Expand Up @@ -173,7 +173,7 @@ user when it asks if they wish to approve your request, and the vehicle will
display the domain name next to the key in the Locks screen.

Follow the instructions to [register your public key and
domain](https://developer.tesla.com/docs/fleet-api#register).
domain](https://developer.tesla.com/docs/fleet-api/endpoints/partner-endpoints#register).
The public key referred to in those instructions is the `public_key.pem` file
in the above example.

Expand Down Expand Up @@ -255,7 +255,7 @@ A command's flow through the system:

### REST API documentation

The HTTP proxy implements the [Tesla Fleet API vehicle command endpoints](https://developer.tesla.com/docs/fleet-api#vehicle-commands).
The HTTP proxy implements the [Tesla Fleet API vehicle command endpoints](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands).

Legacy clients written for Owner API may be using a vehicle's Owner API ID when
constructing URL paths. The proxy server requires clients to use the VIN
Expand Down
2 changes: 1 addition & 1 deletion pkg/connector/inet/inet.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The regular expression below extracts domains from HTTP bodies:
{
"response": null,
"error": "user out of region, use base URL: https://fleet-api.prd.na.vn.cloud.tesla.com, see https://developer.tesla.com/docs/fleet-api#regional-requirements",
"error": "user out of region, use base URL: https://fleet-api.prd.na.vn.cloud.tesla.com, see https://...",
"error_description": ""
}
*/
Expand Down
6 changes: 3 additions & 3 deletions pkg/protocol/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Messages can be sent to vehicles either over a REST API or over BLE.
### HTTPS

See [Fleet API
documentation](https://developer.tesla.com/docs/fleet-api#fleet-api) for
documentation](https://developer.tesla.com/docs/fleet-api/getting-started/what-is-fleet-api) for
information on using OAuth authentication.

To send a message to a vehicle, make a POST request to
Expand All @@ -136,7 +136,7 @@ a command, just that the server received a response. The `RoutableMessage` may
contain an error message.

See [online
documentation](https://developer.tesla.com/docs/tesla-fleet-api#response-codes)
documentation](https://developer.tesla.com/docs/fleet-api/getting-started/conventions#response-codes)
for information on other HTTP status codes.

Although communication between clients and Tesla's servers use TLS/TCP, the
Expand Down Expand Up @@ -201,7 +201,7 @@ A **Fleet Manager** represents a cloud-based Owner key. In vehicles running
2023.38 or later, a Fleet Manager cannot add or remove other users' keys from
the vehicle and cannot send commands over BLE. If a cloud-based service needs
to manage Owner and Driver access, this should be done at the account level
using [Fleet API](https://developer.tesla.com/docs/tesla-fleet-api#vehicle-endpoints).
using [Fleet API](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands).

A **Vehicle Monitor** can read vehicle data, such as location information, but
cannot authorize commands that change the vehicle's state.
Expand Down
2 changes: 1 addition & 1 deletion pkg/proxy/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Package proxy implements a REST API for sending commands to Tesla vehicles.
See the [Fleet API documentation] for available endpoints.
[Fleet API documentation]: https://developer.tesla.com/docs/fleet-api
[Fleet API documentation]: https://developer.tesla.com/docs/fleet-api/getting-started/what-is-fleet-api
*/
package proxy
2 changes: 1 addition & 1 deletion pkg/vehicle/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (v *Vehicle) SetSentryMode(ctx context.Context, state bool) error {
//
// We recommend users avoid this command unless they are managing a fleet of vehicles and understand
// the implications of enabling the mode. See official API documentation at
// https://developer.tesla.com/docs/fleet-api#guest_mode.
// https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands#guest-mode
func (v *Vehicle) SetGuestMode(ctx context.Context, enabled bool) error {
return v.executeCarServerAction(ctx,
&carserver.Action_VehicleAction{
Expand Down

0 comments on commit 6a625f5

Please sign in to comment.