403 Access Denied on Freepik module – despite valid API connection (Make.com Core plan user)

Hi,

I’m encountering a 403 Access Denied error when using the Freepik module in Make. As shown in the attached screenshot, the scenario is making a POST request to /v1/ai/text-to-image/imagen3, but the server immediately returns a 403 error.


Here’s what I’ve already checked:

  • I’m using a valid API connection via Make’s official Freepik module.
  • I’m on the Core plan in Make (paid version).
  • I’ve tested the same POST request manually via the Freepik developer website, and it returns a 200 OK response there, so the API key and request itself seem valid.
  • The issue seems to be related specifically to this AI endpoint or the way Make is sending the request.

Is anyone else experiencing this issue or aware if this endpoint might be restricted to certain Freepik account types? Any help would be appreciated!

Thanks in advance!

Hey, did you ever find a fix for this?

Hi @Sjoerd, Hi @Pepper_Mill,

the app developer here :slight_smile:
Which module are you using? The ‘Make an API Call’ module?
Are you inserting the complete URL “https://api.freepik.com/v1/ai/text-to-image/imagen3” or how exactly do you get this error? From the screenshot I cannot see the full input.

On my end each module works perfectly fine :slight_smile:

It looks like your API key needs to be regenerated, and the connection set up again.

Thank you, Richard and Samliew, for your responses! I’ll look into this further and get back to you once I have more information. Really appreciate the help!

I’ll look into getting a new API key — it’s not super straightforward at Freepik, but I’ll see what I can do and investigate further from there.

Hi Richard,

Thanks for your response - I was using the full URL previously but Make.com support advised against this as I was getting a different error.

When using the full URL:

When using the short URL:

You are correct, this is the Make an API call module. Notable, I don’t get the same error when using the Create an Image from text module - that seems to work without any issues:

Also struggling to work out how to generate a new key. The support bot says to generate a new one on the dashboard page but the option for that doesn’t exist for me, I assume that’s the same for you?

Hi,

API key is working fine.
Support of freepik: “If you wish to reset your API Key we will have to cancel your account.”
Only 1 key can be generated.
It’s not the key

Im stuck

@R-SimplifiedWebhooks @samliew You guys know the answer? would be very helpfull

Sorry, in travelling at the moment and can’t look into it further. I just know it works because I tested it out when I made the previous post.

Take all your time. Hoping to see a solution for this. Happy travelling!

@Sjoerd Hi! I also had this issue, but I managed to resolve it. I can assume that you’re sending the parameters for creating the image in the Body as plain JSON, for example: { "prompt": "some prompt" }.
I did the same at first and had the same error. However, the way I fixed it was by creating a separate module before the Freepik module, where I generated the JSON with all the required parameters. Then I passed this prepared JSON into the Body for Freepik.

I hope this helps you too!

Welcome to the Make community!

You can also put the JSON in the Freepik module, but you have to encode the text output from OpenAI into JSON-safe characters first.

Escaping strings before mapping into another JSON string

Most of the time, you cannot directly map variables containing text content into another JSON string without escaping them, as the variable might contain characters that have a special meaning in JSON.

Special characters in strings needs to be specified (escaped) as a “literal” character (instead of a special metacharacter), otherwise they make the whole JSON invalid when you map the variable value when creating another JSON string.

You can escape string variables by passing the text into the JSON “Transform to JSON” module —

Transforms any object to JSON.

Then, you can map the output of the “Transform to JSON” module into your JSON string. (Do note that when using the “Transform to JSON” module, the output should already contain the double quotes " " around your text, so when you map this output into your JSON, you should not need to wrap another pair of double quotes around it.)

Alternatively, you can use the built-in function replace to replace those special characters with their escaped versions, as discussed here.

For more information on escaping JSON strings, see: Understanding JSON Escape: A Comprehensive Guide

Hope this helps! Let me know if there are any further questions or issues.

@samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!