I have a key and a secret.
According to https://dev.rumbletalk.com/rest/authentication
I can issue a request to get an access token:
https://api.rumbletalk.com/token
passing key and secret as parameters:
However, I am getting
{
"type": "Exception",
"status": false,
"message": "Missing credentials: key, secret"
}
Any idea why?
Rumble API key and secret have correct values from the collection variables.
URL
POST https://api.rumbletalk.com/token
Using raw
instead of form-data
or application/x-www-form-urlencoded
In body,
{
"key":"your key",
"secret":"your secret"
}
curl --location --request POST 'https://api.rumbletalk.com/token' \
--header 'Content-Type: application/json' \
--data-raw '{
"key":"your key",
"secret":"your secret"
}'
node.js
callSave as demo.js
const axios = require("axios");
const getToken = async () => {
try {
const res = await axios.post(
'https://api.rumbletalk.com/token',
{
'key': 'your key',
'secret': 'your secret'
},
{
headers: {
'Content-Type': 'application/json'
}
}
);
return Promise.resolve(res.data);
} catch (error) {
return Promise.reject(error);
}
};
getToken()
.then(result => {
console.log(result);
})
.catch(error => {
console.error(error);
});
node.js
Result