Home > Back-end >  API | Coinimp | user/withdraw | Invalid parameters (POST)
API | Coinimp | user/withdraw | Invalid parameters (POST)

Time:09-21

Anyone here using coinimp and have the same problem with me? Have you fixed it? can you help me?

So I am trying to test the POST of the user/withdraw, I followed the documentation of it at enter image description here

My account currently have a total of 1 330 827
enter image description here

I tried to POST via https://reqbin.com and https://web.postman.co and giving me the same error which is the:

{
    "message": "Invalid parameters.",
    "status": "failure"
}

My API request is (POST API KEY AND ID HEADER):

https://www.coinimp.com/api/v2/user/withdraw?site-key={sitekey}&user={user_id}&amount={hash amount}

CodePudding user response:

It will not work if it is not form-data, I also used request library instead of axios.

Code:

const mintmeWithdraw = {
    method: "POST",
    url: "https://www.coinimp.com/api/v2/user/withdraw",
    headers: {
        "Content-Type": "multipart/form-data",
        "X-API-ID": 'api-id-here',
        "X-API-KEY": 'api-key-here'
    },
    formData : {
        "site-key" : `you-site-key`,
        "user" : `user-here`,
        "amount" : `hash-amount`
    }
};

request(mintmeWithdraw, async function (err, res, body) {
    if(err) throw err;
}); 
  • Related