Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!