How to Calculate HMAC-SHA1 Signature in Make Using the HTTP Request Module and Upload Videos to Alibaba Cloud OSS?
Hello everyone,
I’m facing some difficulties while automating video uploads to Alibaba Cloud OSS using Make. The main issue is that I need to generate an HMAC-SHA1 signature to authenticate the upload request, but Make doesn’t natively support HMAC-SHA1 signature calculation.
Problem Description:
- HMAC-SHA1 Signature Calculation:
- I’m trying to use Make’s HTTP Request module to call an external API (such as a Python backend or third-party service) to generate the signature.
- However, I’m unsure how to properly send the request within Make and apply the returned signature in the Authorization header of the Alibaba Cloud OSS upload request.
- Using a Python Backend:
- I’ve developed a Flask API service that generates the HMAC-SHA1 signature.
- However, I’m not sure how to correctly integrate Make’s HTTP Request module to call this Python API, retrieve the signature, and use it for the video upload.
- Time Formatting Issue:
- I also need to format the current timestamp in GMT for the signature string.
- I initially tried using Google Sheets to get the current time, but I encountered formatting issues when using Make’s
formatDate()
function.
Attempts So Far:
- Using Python or an external API to generate the signature.
- Calling an external service via Make’s HTTP Request module to compute the HMAC-SHA1 signature.
- Attempting to fetch and format the timestamp using Google Sheets but facing formatting inconsistencies.
Has anyone encountered a similar issue? Could you share a detailed guide on how to calculate the HMAC-SHA1 signature in Make using an HTTP request and successfully upload a file to Alibaba Cloud OSS?
I’d really appreciate any help! Thanks in advance!
大家好,
我在使用 Make 自动化上传视频到 阿里云 OSS 时遇到了一些困难。主要问题是我需要计算 HMAC-SHA1 签名 来认证阿里云的上传请求,但 Make 本身不支持直接计算 HMAC-SHA1 签名。
问题描述:
- HMAC-SHA1 签名计算:
- 我正在尝试通过 Make 的 HTTP 请求模块 调用一个外部 API 来计算签名(比如 Python 后端或第三方 API)。但是,我不确定如何正确地在 Make 中传递签名计算的请求,并将返回的签名用于阿里云 OSS 上传请求的 Authorization 头部。
- 使用 Python 后端:
- 我编写了一个 Flask API 服务来计算签名(HMAC-SHA1)。但是,我不确定如何通过 Make 的 HTTP 请求模块 正确调用这个 Python 后端 API 来计算签名,并返回给 Make 用于上传视频文件。
- 时间格式化问题:
- 我还需要将 当前时间 格式化为 GMT 时间,以便构建签名字符串。虽然我使用了 Google Sheets 来获取当前时间,但在 Make 中使用
formatDate()
函数时出现了问题,时间格式不正确。
目前尝试的方法:
- 使用 Python 或 外部 API 来计算签名。
- 通过 HTTP 请求模块 在 Make 中调用外部服务来计算 HMAC-SHA1 签名。
- 尝试使用 Google Sheets 获取时间并格式化为 GMT,但遇到了格式化的问题。
请问有没有人遇到过类似的情况,能否提供一下如何在 Make 中通过 HTTP 请求计算 HMAC-SHA1 签名 并上传文件到 阿里云 OSS 的详细步骤?
非常感谢大家的帮助!