Method: agents.storeHashes

Stores message hashes with Verified SMS.

Send messages over SMS only after you receive a 200 OK response from this API call. Otherwise, messages may not be appear as verified on user devices.

HTTP request

POST https://verifiedsms.googleapis.com/v1/{name=agents/*}:storeHashes

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

"agents/{agentId}", where {agentId} is the Verified SMS agent identifier. For example, with the ID growing-tree-bank, the endpoint is https://verifiedsms.googleapis.com/v1/agents/growing-tree-bank:storeHashes.

Request body

The request body contains data with the following structure:

JSON representation
{
  "hashes": {
    object (Hashes)
  },
  "publicKey": string
}
Fields
hashes

object (Hashes)

Hash values of the SMS messages.

publicKey

string (bytes format)

Optional. A public key value, with a size of 120 bytes, created with elliptic curve NIST P-384.

If the value is set, and it does not match the public key registered on the server for the corresponding agent, the platform returns a 400 INVALID_ARGUMENT error.

A base64-encoded string.

Response body

If successful, the response body will be empty.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/verifiedsms

For more information, see the OAuth 2.0 Overview.

Hashes

Hash values of SMS messages or message segments.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string (bytes format)

Hash values for SMS messages or message segments. Agents are responsible for splitting messages into segements and creating hash values for each segment.

Maximum 10,000 values per API call.

Hash values are calculated with an SHA256-based HMAC key derivation function that includes {shared_secret} and {segment}. {shared_secret} is a computed shared secret based on agent and user keys created using an ECDH algorithm with elliptic curve NIST P-384.

Each hash value is 32 bytes.

A base64-encoded string.