GPS WEBHOOK

Set up your GPS webhook receiver

Receive event-driven GPS plot updates from Verizon Connect through Amazon SNS.
Build a secure HTTPS endpoint and Reveal can send each new plot to your integration, without polling for updates.

Who this guide is for: developers who build and operate the receiving endpoint.

What you receive: a CloudEvents v1.0 message for every unique GPS plot, delivered through Amazon SNS.

How it works

Reveal sends GPS plots through Amazon SNS. Your endpoint receives a one-time subscription confirmation, then ongoing plot notifications.

Amazon SNS request headers and message types

Amazon SNS sends both message types to the same endpoint.
Requests include the User-Agent: Amazon Simple Notification Service Agent header.

Use the x-amz-sns-message-type header to identify each request; you don't need to parse the body to determine its type:

  • SubscriptionConfirmation: Activates the subscription during setup.
  • Notification: Contains GPS plot data.

Prerequisites

Before building the receiver, ask your Verizon Connect account manager or admin to:

  • Confirm GPS webhook access is enabled for your account.
  • Agree on the Basic auth credentials (username and password) that Reveal will use to authenticate to your endpoint.

Then have your details ready to enter in Reveal:

  • Your public endpoint URL.
  • The integration username and password.
  • And a contact who can submit the endpoint through the Reveal integration setup.
Screenshot: the Submit GPS webhook endpoints page in Reveal, with the Submit endpoints form (Webhook endpoint URL, Username and Password fields) and the Integration status steps: Webhook endpoints submitted, Submission confirmed, Integration enabled

Endpoint requirements

The receiving endpoint must meet each requirement below for the SNS subscription to succeed.

REQUIREMENTDETAIL
ProtocolHTTPS only. Plain HTTP is not accepted.
TLSTLS 1.2 or later, with a certificate from a trusted public CA. Certificate warnings are not allowed.
Port443.
AuthenticationHTTP Basic (username + password).
Accepted Content-Typetext/plain; charset=UTF-8 — required for both the subscription confirmation and the plot notifications. The body contains a JSON SNS envelope.
Public reachabilityThe endpoint must be publicly reachable from the internet.
Host nameMust not contain an underscore (_).
CredentialsUsername/password must not contain escape sequences or special characters such as / \ ' " : @. Confirm the exact validation rules with the account administrator before choosing credentials.

NOTE: Amazon SNS always sets the outer message content type header to text/plain; charset=UTF-8.
However, the message payload remains JSON. Refer to the datacontenttype field (application/json) in the CloudEvent envelope to determine how to parse the inner data object.


Set up your GPS webhook

  1. Create a secure webhook endpoint

    Set up a secure HTTPS endpoint to receive webhook payloads, validate incoming requests, and acknowledge delivery promptly.
    Route requests by the x-amz-sns-message-type HTTP header; you do not need to inspect the body to distinguish the message types.
    SubscriptionConfirmation activates the subscription. Notification carries GPS plots.
    a) Handle the authentication challenge
    The first SubscriptionConfirmation request may arrive without an Authorization header. Respond with 401 Unauthorized and a WWW-Authenticate: Basic header.
    Amazon SNS then retries the request with the Basic credentials configured for the integration.
    HTTP/1.1 401 Unauthorized
    WWW-Authenticate: Basic
    

    b) Confirm the subscription once
    After authentication, Amazon SNS sends a SubscriptionConfirmation message to your endpoint. To confirm the subscription, read SubscribeURL from the message body and send an HTTP GET request to that URL. Amazon SNS returns an XML ConfirmSubscriptionResponse when the confirmation succeeds.
    POST / HTTP/1.1
    x-amz-sns-message-type: SubscriptionConfirmation
    x-amz-sns-message-id: 165545c9-2a5c-472c-8df2-7ff2be2b3b1b
    x-amz-sns-topic-arn: arn:aws:sns:us-west-2:123456789012:MyTopic
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
    Content-Length: 1336
    Content-Type: text/plain; charset=UTF-8
    Host: myhost.example.com
    Connection: Keep-Alive
    User-Agent: Amazon Simple Notification Service Agent
    
    {
      "Type": "SubscriptionConfirmation",
      "MessageId": "165545c9-2a5c-472c-8df2-7ff2be2b3b1b",
      "Token": "2336412f37...",
      "TopicArn": "arn:aws:sns:us-west-2:123456789012:MyTopic",
      "Message": "You have chosen to subscribe to the topic arn:aws:sns:us-west-2:123456789012:MyTopic.\nTo confirm the subscription, visit the SubscribeURL included in this message.",
      "SubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-west-2:123456789012:MyTopic&Token=2336412f37...",
      "Timestamp": "2012-04-26T20:45:04.751Z",
      "SignatureVersion": "1",
      "Signature": "EXAMPLEpH+DcEwjAPg8O9mY8dReBSwksfg2S7WKQcikcNKWLQjwu6A4VbeS0QHVCkhRS7fUQvi2egU3N858fiTDN6bkkOxYDVrY0Ad8L10Hs3zH81mtnPk5uvvolIC1CXGu43obcgFxeL3khZl8IKvO61GWB6jI9b5+gLPoBc1Q=",
      "SigningCertURL": "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem"
    }
    

    Plot delivery starts after confirmation: No GPS plot notifications are sent until the subscription is confirmed. You only need to confirm it again if the endpoint URL or credentials change in Reveal.
    c) Receive and acknowledge plot notifications
    After confirmation, SNS sends Notification messages to the same endpoint. Parse each JSON body as a CloudEvent and read the GPS plot from data.
    Validate the notification, place it on a queue, and return 200 OK within 15 seconds. Process the plot asynchronously after acknowledging delivery.
    When data.isPrivate is true, the payload does not include the address, latitude, longitude, or speed.
    Response-code rule needs confirmation: Return 200 OK to acknowledge delivery. Other 2xx status codes are not confirmed; check with the webhook owner before relying on them.
    See Receive and acknowledge plot events for response and privacy requirements.
    Also see the payload reference and code samples.
    POST / HTTP/1.1
    x-amz-sns-message-type: Notification
    x-amz-sns-message-id: 22b80b92-fdea-4c2c-8f9d-bdfb0c7bf324
    x-amz-sns-subscription-arn: arn:aws:sns:us-west-2:123456789012:MyTopic:c9135db0-26c4-47ec-8998-413945fb5a96
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
    Content-Type: text/plain; charset=UTF-8
    Host: myhost.example.com
    User-Agent: Amazon Simple Notification Service Agent
    
  2. Test and monitor webhook deliveries

    Verify the endpoint is publicly reachable, then confirm it receives and processes plots after the subscription is active.
    • Verify reachability before you subscribe (see the FAQ for the cURL check against an API).
    • Make processing idempotent because retries can deliver the same plot more than once. De-duplicate using:
      • the SNS x-amz-sns-message-id header, and/or
      • the payload data.sequenceId; the sequence ID can also help order plots and detect gaps.
    • Log and alert on failed responses (non-200 responses, processing exceptions) so you can investigate missed events.
    • Allow 5–15 minutes for the first plots to arrive after confirmation.
  3. Submit your endpoint

    Once the endpoint is built and tested, share its URL and credentials with your Reveal administrator or account manager.
    Ask them to submit the endpoint and credentials through the Reveal Marketplace. Submitting these in Reveal starts the subscription-confirmation process described in Step 1.

GPS plot payload reference

SNS sends a JSON envelope with CloudEvents 1.0 fields. The GPS plot is nested under data.
The HTTP request content type is text/plain; charset=UTF-8; the envelope's datacontenttype describes the inner data as application/json.

{
  "specversion": "1.0",
  "id": "813af552-c049-43d9-b978-159a1857f43e",
  "type": "com.verizonconnect.integrations.vehicle.position.updated",
  "source": "https://verizonconnect.com/integrations/channels/push",
  "time": "2022-10-05T09:45:30.3799855Z",
  "subject": "vehicle.esn.342434234",
  "datacontenttype": "application/json",
  "traceparent": "00-14807e2fb520d20f5f779b6dc7b24edf-8183903ec4aa3410-00",
  "data": {
    "sequenceId": 999000000,
    "updateUTC": "2022-10-21T13:34:39",
    "deviceTimeZoneOffset": 2,
    "deviceTimeZoneUseDST": true,
    "displayState": "Idle",
    "isPrivate": false,
    "speedKmph": 85,
    "directionDegrees": 280,
    "heading": "North",
    "deltaDistanceKm": 0.354,
    "odometerKm": 120045,
    "totalEngineMinutes": 1380,
    "idleTimeMinutes": 4,
    "latitude": -6.3752626,
    "longitude": 53.2979679,
    "deltaTimeInSec": 90,
    "sensorBits": 65,
    "sensorValues": ["Boom Stow 1-ON", "Boom Stow 2-OFF", "Boom Stow 3-OFF", "Boom Stow 4-OFF"],
    "vehicle": {
      "number": "V242342",
      "name": "Truck2324",
      "vin": "Z232SD43FAS",
      "esn": 342434234
    },
    "address": {
      "addressLine1": "Atrium Building, Blackthorn Road",
      "addressLine2": "Sandyford Business Park",
      "locality": "Dublin",
      "postalCode": "D18 F5X2",
      "administrativeArea": "Dublin",
      "country": "IRL"
    },
    "driver": {
      "driverKeyFobId": 234423678,
      "driverNumber": "D234",
      "driverFirstName": "Tim",
      "driverLastName": "Daruch"
    }
  }
}

CloudEvent envelope

FIELDDESCRIPTION
specversionCloudEvents spec version (1.0).
idUnique event ID.
typecom.verizonconnect.integrations.vehicle.position.updated
sourceEvent source (URI), for example https://verizonconnect.com/integrations/channels/push.
timeEvent time (UTC, RFC 3339).
subjectEvent subject, e.g. vehicle.esn.342434234.
datacontenttypeContent type of the data member — application/json.
traceparentW3C trace context for correlation/observability.
dataThe GPS plot (fields below).

GPS plot fields in data

FIELDNOTES AND DEFAULT VALUES
vehicle.numberThe Vehicle Number as configured in Reveal.
vehicle.nameThe Vehicle Name as displayed in the Reveal account.
vehicle.vinThe VIN as displayed in the Reveal account.
vehicle.esnUniquely identifies a vehicle. Mandatory for vehicle creation in Reveal.
sequenceIdSequence identifier for individual plots. Use it to order plots and detect duplicates during retries.
updateUTCTimestamp (UTC) when the GPS plot was received. Format YYYY-MM-DDThh:mm:ss.
deviceTimeZoneOffsetThe GPS device's current time zone offset from UTC.
deviceTimeZoneUseDSTtrue if the Reveal account acknowledges Daylight Saving Time. US accounts default to true.
displayStateVehicle display state: 0 Coverage, 1 Moving, 2 Stop, 3 Towing, 4 Idle, 5 Panic, 6 Privacy.
isPrivatetrue when the Privacy feature hides location during non-business hours. When true, address, coordinates, and speed are not returned.
speedKmphSpeed in kilometers per hour.
directionDegreesCompass direction, in degrees.
headingNorth, North East, East, South East, South, South West, West, North West, Unknown.
deltaDistanceKmDistance accumulated since the previous plot. Defaults to 0 if none accumulated.
odometerKmOdometer is the vehicle's current odometer reading, in kilometers, at the requested UTC timestamp.
totalEngineMinutesEngine minutes accumulated across the device lifetime during Ignition-On plots.
idleTimeMinutesContinuous idling time, in minutes.
deltaTimeInSecTime between the previous plot and this plot. Defaults to NULL if none accumulated.
addressGlobal address components: addressLine1 (e.g. house number), addressLine2 (e.g. apartment), locality (city/town), administrativeArea (state/province), postalCode, country.
latitudeLatitude coordinate of the plot.
longitudeLongitude coordinate of the plot.
driver.driverKeyFobIdHexadecimal value of the driver's current key fob, supplied in Reveal.
driver.driverNumberUnique driver identifier in Reveal. NULL if no driver assigned, or the assigned driver has no number.
driver.driverFirstNameDriver's first name in Reveal. NULL if no driver assignment for this plot.
driver.driverLastNameDriver's last name in Reveal. NULL if no driver assignment for this plot.
sensorBitsCombined decimal value of all sensor flags.
sensorValuesNames of sensors that are active (ON) for this plot.

Delivery and retry behavior

Build your receiver to tolerate duplicate deliveries. A failed acknowledgement can cause the same message to be retried.

BEHAVIORWHAT TO EXPECT
Success responseOnly HTTP 200 OK is confirmed as a successful response. Check with the webhook owner whether other 2xx status codes are accepted.
Response deadlineMust respond within ~15 seconds, or the delivery is considered failed.
RetriesAfter a failed delivery, the service retries the same message up to 2 times, at 60-second intervals. If delivery still fails, the message is discarded.
Duplicate handlingUse x-amz-sns-message-id and/or data.sequenceId to detect duplicate deliveries. Use sequenceId to order plots and detect gaps.
First plotAllow 5–15 minutes after subscription confirmation for the first plots to arrive.

Keep the request path short

Validate and enqueue the event synchronously, acknowledge it, then do downstream processing asynchronously. Log and alert on non-200 responses and processing exceptions so your team can investigate missed events.


FAQ and troubleshooting

Not receiving the subscription confirmation message

  1. Confirm that the endpoint is publicly reachable over HTTPS on port 443, uses TLS 1.2 or later with a trusted certificate, and accepts requests with Content-Type: text/plain; charset=UTF-8. The host name must not contain an underscore, and the credentials must meet the restrictions listed under Endpoint requirements.
    From any machine or REST client (e.g. Postman), send a test POST:
    curl -X POST your_HTTPS_endpoint -H "Content-Type: text/plain; charset=UTF-8" --data '{"x":"y"}' -v
    
    • From outside your network, send the approved test POST request to the endpoint and confirm that it returns 200 OK.
    • If SNS cannot reach the endpoint, subscription setup may fail with an InvalidParameter: Unreachable Endpoint error.
    • Your host name must not contain an underscore, and the username/password must not contain escape sequences or special characters such as / \ ' " : @.
  2. Confirm that your endpoint routes requests using the x-amz-sns-message-type header, and handles both SubscriptionConfirmation and Notification messages. Example of confirmation header:
    POST / HTTP/1.1
    x-amz-sns-message-type: SubscriptionConfirmation
    x-amz-sns-message-id: 165545c9-2a5c-472c-8df2-7ff2be2b3b1b
    x-amz-sns-topic-arn: arn:aws:sns:us-west-2:123456789012:MyTopic
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
    Content-Type: text/plain; charset=UTF-8
    Host: your_host_name
    User-Agent: Amazon Simple Notification Service Agent
    
  3. The initial SubscriptionConfirmation request may arrive without an Authorization header. In that case, respond with 401 Unauthorized and a WWW-Authenticate: Basic header (per RFC 7617 / RFC 2617):
    WWW-Authenticate: Basic
    

Will this 401 happen for every plot?

Confirm with your webhook owner whether Amazon SNS includes Basic credentials with every notification. Do not assume the 401 challenge happens only during setup.

Why is Content-Type text/plain when the sample shows application/json?

text/plain; charset=UTF-8 is the HTTP content type Amazon SNS uses for the request body, which contains a JSON envelope.
Inside that envelope, datacontenttype: application/json describes the data member.
Accept the SNS request as text/plain, parse its body as JSON, then process data as JSON.

How do I handle duplicates and ordering?

During temporary failures, SNS may retry a delivery, so the same plot can arrive more than once.

  • Process notifications idempotently.
  • Use data.sequenceId to order plots, detect duplicates, and identify gaps.
  • Use the x-amz-sns-message-id header to identify duplicate SNS deliveries.

Code samples

Reference only — adapt to your framework and replace the hard-coded credential check with a constant-time comparison against securely stored secrets.

Authentication middleware (Basic → 401 + WWW-Authenticate)

public async Task Invoke(HttpContext context)
{
    var authHeader = context.Request.Headers.Get("Authorization");
    if (authHeader != null && authHeader.StartsWith("basic", StringComparison.OrdinalIgnoreCase))
    {
        var token = authHeader.Substring("Basic ".Length).Trim();
        var credentialString = Encoding.UTF8.GetString(Convert.FromBase64String(token));
        var credentials = credentialString.Split(':');
        if (credentials[0] == "admin" && credentials[1] == "password")
        {
            var claims = new[] { new Claim("name", credentials[0]), new Claim(ClaimTypes.Role, "Admin") };
            var identity = new ClaimsIdentity(claims, "Basic");
            context.User = new ClaimsPrincipal(identity);
        }
    }
    else
    {
        context.Response.StatusCode = 401;
        context.Response.Headers.Set("WWW-Authenticate", "Basic");
    }

    await _next(context);
}

Process the SNS message (confirmation + notification)

[HttpPost]
[Consumes(MediaTypeNames.Text.Plain)]
public async Task<IActionResult> ProcessRequest()
{
    var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };

    try
    {
        string requestMessage;
        using (var reader = new StreamReader(Request.Body, Encoding.UTF8))
        {
            requestMessage = await reader.ReadToEndAsync();
        }

        switch (Request.Headers["x-amz-sns-message-type"])
        {
            case "SubscriptionConfirmation":
                var snsMessage = JsonSerializer.Deserialize<SnsMessageModel>(requestMessage);
                bool hasConfirmed = await ConfirmSubscription(snsMessage.SubscribeURL);
                // retry or process further if needed
                break;

            case "Notification":
                var cloudEvent = JsonSerializer.Deserialize<VzcCloudEvent>(requestMessage, options);
                await ProcessVzcGpsMessage(cloudEvent.Data);
                break;

            default:
                // handle your default
                break;
        }

        return Ok();
    }
    catch (Exception ex)
    {
        _logger.LogError(ex, "Processing webhook request failed");
        return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
    }
}

private async Task<bool> ConfirmSubscription(string subscriptionUrl)
{
    using var httpClient = new HttpClient();
    var response = await httpClient.SendAsync(
        new HttpRequestMessage(HttpMethod.Get, new Uri(subscriptionUrl)));
    return response.IsSuccessStatusCode;
}

private Task ProcessVzcGpsMessage(GpsPlotMessage gpsData)
{
    // Process GPS data
    return Task.CompletedTask;
}

Sample models

public class VzcCloudEvent
{
    public string Type { get; set; }
    public string SpecVersion { get; set; }
    public string Source { get; set; }
    public string Subject { get; set; }
    public DateTime Time { get; set; }
    public GpsPlotMessage Data { get; set; }
}

public class GpsPlotMessage
{
    public int SequenceId { get; set; }
    public VehicleInfo Vehicle { get; set; }
    public DateTime UpdateUTC { get; set; }
    public float DeviceTimeZoneOffset { get; set; }
    public string DisplayState { get; set; }
    public bool IsPrivate { get; set; }
    public float SpeedKmph { get; set; }
    public int DirectionDegrees { get; set; }
    public string Heading { get; set; }
    public float DeltaDistanceKm { get; set; }
    public double OdometerKm { get; set; }
    public int TotalEngineMinutes { get; set; }
    public int IdleTimeMinutes { get; set; }
    public AddressInfo Address { get; set; }
    public double? Latitude { get; set; }
    public double? Longitude { get; set; }
    public DriverInfo Driver { get; set; }
    public float DeltaTimeInSec { get; set; }
    public int SensorBits { get; set; }
    public string[] SensorValues { get; set; }
}

public class VehicleInfo
{
    public string Number { get; set; }
    public string Name { get; set; }
    public string VIN { get; set; }
    public long? ESN { get; set; }
}

public class AddressInfo
{
    public string AddressLine1 { get; set; }
    public string AddressLine2 { get; set; }
    public string Locality { get; set; }
    public string PostalCode { get; set; }
    public string AdministrativeArea { get; set; }
    public string Country { get; set; }
}

public class DriverInfo
{
    public object DriverKeyFobId { get; set; }
    public string DriverLastName { get; set; }
    public string DriverFirstName { get; set; }
    public string DriverNumber { get; set; }
}

AWS API Gateway

If AWS API Gateway sits in front of your endpoint, configure it to respond to the initial request without an Authorization header with 401 Unauthorized and a WWW-Authenticate: Basic header. See Step 1a for details.

Screenshot: AWS API Gateway, Gateway Responses, Unauthorized: status code 401 and the response header WWW-Authenticate with the value Basic