API Reference

Authorization helpers.

vws_auth_tools.rfc_1123_date() str

Return the date formatted as per RFC 2616, section 3.3.1, rfc1123-date.

This is the date needed by the VWS API, as described in https://library.vuforia.com/articles/Training/Using-the-VWS-API.

vws_auth_tools.authorization_header(access_key: str, secret_key: str, method: str, content: bytes, content_type: str, date: str, request_path: str) str

Get an Authentication header for the VWS API.

This can be used for a request made to the VWS API with the given attributes.

See https://library.vuforia.com/articles/Training/Using-the-VWS-API.

Parameters:
  • access_key – A VWS server or client access key.

  • secret_key – A VWS server or client secret key.

  • method – The HTTP method which will be used in the request.

  • content – The request body which will be used in the request.

  • content_type – The Content-Type header which is expected by endpoint. This does not necessarily have to match the Content-Type sent in the headers. In particular, for the query API, this must be set to multipart/form-data but the header must include the boundary.

  • date – The current date which must exactly match the date sent in the Date header.

  • request_path – The path to the endpoint which will be used in the request.

Returns:

An Authorization header which can be used for a request made to the VWS API with the given attributes.