Need help with API response.
# 🤝help
l
Hi, I have been trying to build a chatbot that checks for the availability of the domain names via chat and replies 'Available' or 'Not Available'. With my basic coding knowledge and resources available. I am trying to piece it together. Currently, I am facing a hurdle and finding it hard to overcome. The API doc is available https://doc-reseller-api.ds.network. const fetch = require('node-fetch'); const crypto = require('crypto'); function md5(data) { return crypto.createHash('md5') .update(String(data)) .digest('hex'); } const request_id = md5(Date.now().toString()) const signature = md5(request_id + api_key) I have faced multiple errors with 'node-fetch' and md5 encryption. So, I resolved to generate the 'request_id' and 'signature' using an online hash generator. I am able to get the API response finally. However, the online generation of 'request_id' key can be utilized only once and requires me to generate it again for another use. 1. How do I resolve this issue so that API request_ID and signature are generated automatically? 2. How do I capture the API response and reply whether the domain is Available or Not Available? https://cdn.discordapp.com/attachments/1247872178058301460/1247872178205229148/image.png?ex=66619b07&is=66604987&hm=cd7ef0d07d767056338221c1fd9151965bdc8424896feb51dd56a41d09a930c4& https://cdn.discordapp.com/attachments/1247872178058301460/1247872178473402460/image.png?ex=66619b07&is=66604987&hm=806763c8e1992d71af831ddd1182988285ba348e57947c90ac6e5d6fade832cb&
c
I'm pretty sure you could do this by using [Make](https://www.make.com/en).
l
Ahh.Not familiar with Make.com. Let me try.
l
require statement cannot be used in Botpress
That's why it's not working
l
How do I resolve this? I don't see any workaround for MD5 encryption of API signature and Request ID. I tried with Make.com. I don't know if it's because of my lack of knowledge, I could not connect. Is there any suggestion?
@acceptable-gold-88171 I tried the question at the office event yesterday. How do I get API request_ID and signature that are generated using MD5 encryption? Since botpress does not allow the import of 'crypto' or any other library.
5 Views