Getting subscription error when calling RapidAPI service despite having valid API key

I’m working with a word generation service from RapidAPI and running into a frustrating issue. Even though I have my API key set up correctly, I keep getting a subscription error message when I try to make requests.

I grabbed the sample code from the API documentation page and made sure to include my authentication key in the headers. However, every time I run my script, it returns an error saying I’m not subscribed to the service.

Here’s the code I’m using:

const axios = require('axios');

const config = {
    method: 'GET',
    headers: {
        'X-RapidAPI-Key': 'MY-API-KEY-HERE',
        'X-RapidAPI-Host': 'word-generator-api.p.rapidapi.com'
    }
};

axios.get('https://word-generator-api.p.rapidapi.com/generateWords?amount=3&length=6', config)
    .then(result => {
        console.log(result.data);
    })
    .catch(error => {
        console.log(error.response.data);
    });

The error I’m seeing is:

{ message: ‘You are not subscribed to this API.’ }

What steps do I need to take to properly subscribe and get this working? I thought just having the API key would be enough.

Had this exact problem a few months back with a different RapidAPI service. Your code’s fine - the issue is you’re not actually subscribed to the service. Having an API key doesn’t mean you’re subscribed. Go back to the RapidAPI marketplace, find the word generation service, and hit subscribe. Even for free tiers, you have to explicitly subscribe. I thought generating an API key was the same as subscribing - nope, they’re separate steps. Once I subscribed properly, my code worked immediately. Check your RapidAPI dashboard to see what you’re actually subscribed to.

Same thing happened to me last week lol. RapidAPI’s confusing here - you can grab API keys without actually subscribing, which is weird. Go back to the API page and find the subscribe button. Even for free plans, you still need to click it. Also double-check you’re using the exact API name from your dashboard. I’ve seen tons of similar-sounding APIs that are completely different services.

Yeah, this error got me too when I started with RapidAPI. The weird thing is they let you grab API keys and read docs without actually subscribing to anything. You need to go to that specific API’s page in their marketplace and hit the subscribe button - even for free tiers, you still have to subscribe. Takes a few minutes to kick in once you do. Also heads up - I’ve seen the endpoint URL in the docs not match what you’re actually subscribed to. Double-check that the service name in your URL matches exactly what shows up in your RapidAPI dashboard under active subscriptions.