ApifyClient.API.Tools (apify_client v1.0.0)

Copy Markdown View Source

Provides API endpoints related to api/tools

Summary

Functions

Decode and verify object

Encode and sign object

Functions

decode_and_verify(body, opts \\ [])

@spec decode_and_verify(
  body :: map() | ApifyClient.Schemas.DecodeAndVerifyRequest.t(),
  opts :: keyword()
) ::
  {:ok, ApifyClient.Schemas.DecodeAndVerifyResult.t()}
  | {:error, ApifyClient.Error.t()}

Decode and verify object

Decodes and verifies an encoded value previously created by the encode-and-sign endpoint. Returns the original decoded object along with information about the user who encoded it and whether that user is verified.

Important: The request must specify the Content-Type: application/json HTTP header.

Request Body

Content Types: application/json

encode_and_sign(body, opts \\ [])

@spec encode_and_sign(body :: map(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.EncodeAndSignResult.t()}
  | {:error, ApifyClient.Error.t()}

Encode and sign object

Encodes and signs any JSON object. The encoded value includes a signature tied to the authenticated user's ID, which can later be verified using the decode-and-verify endpoint.

Important: The request must specify the Content-Type: application/json HTTP header.

Request Body

Content Types: application/json