Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
How to hide external API token at .Net

I am working on an .net 5 web api projectt. I needed to use an external api (rapidapi.com etc.) . These websites gave me a apitoken. I know i should hide it , so no one at github would see it.

But also i should sent my apikey to my teacher so he could acces to, or hecan acces with his own apikey.

1.where sholud i store it? 2.How Should i store it? 3.How can i call it?

I know how to do it at JS, (its so easy, create .env file, and call it einvironmet.apikey ) , but don't know at .net. I need a simple solution like js

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You should use "User secrets", as described by Microsoft.

It's very easy in Visual Studio where you just right click your project and choose "Manage User Secrets". This will create a file in this location: %APPDATA%\Microsoft\UserSecrets\<user_secrets_id>\secrets.json

This file is outside your project so it will never be a part of what you have in Github.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda