Custom field and autofill content

I want to make a custom field where I input a license plate of a car, it fetches from an api some data and uses that data to fill in fields in the content entry, is this possible? if yes how

This topic has been created from a Discord post (1243924514174271488) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

Yes, it is possible. See here for how to add a custom field in general: https://docs.strapi.io/dev-docs/custom-fields From there, ultimately, a custom field is just a react component, so oyu would do fetches like you in a normal component. Keep in mind, that you still can only use Strapi content field types. https://docs.strapi.io/user-docs/content-type-builder/configuring-fields-content-type

Been battling with this bug the entire day

I searched the entire discord, did everything

Not sure based on that error. I just recently added a semi-complicated custom field, just by following the guide I posted.

No I dont believe this

I followed everything

People having the same error and I did what all the answers said

That’s generally where everyone who’s doing it for first time start

<@125038622289166336> <@632956853122236457> Do you know when making a custom field how I can use the strapi’s design system in react? so the input field looks the same as the rest?

You should be able to just import it. https://design-system-git-main-strapijs.vercel.app/?path=/docs/design-system-components-textinput--docs

something weird is happening

In my custom field, I am doing a fetch to a content type

but its giving me unauthorized, while the Public role has find and findOne access to all

This fetch is happening from the same server

Probably this, having this exact same problem

Well, you are calling the content-api I suppose. Strapi has something called an admin API, that you probably have to use.

See here for example: https://forum.strapi.io/t/how-to-call-default-api-endpoint-in-custom-plugin/28813/21

You mean custom made endpoints?