ASP.NET Core API Proxy
Budget: $10 – $30 USD
I have an existing SPA (Angular) which uses an ASP.net Core API backend. The backend application has token based authentication and other services via APIs. I would like to use SendGrid's Marketing Campaign API in my SPA. They provide a RESTful API, and uses an API Key for Authentication.
Currently the SPA is storing the API key in local storage and makes API calls directly SendGrid URLs sending the API key in the authorization header. This however is not secure.
To secure the calls I will need to use my ASP.net Core API backend, however duplicating & implementing every SendGrid Endpoint seems unnecessary if only the authorization header is modified
This project deliverable to is provide a working sample of a ASP.NET Core API Proxy which works with ASP.NET Core 3.1.
Create an API project (Target Framework = .NET Core 3.1)
Add JWT Token Authentication in the ConfigureServices / Startup.cs
Add a value in the config.json file to keep the sendgrid API Key
Configure the solution / proxy such that requests/responses are passed/returned to my API (modifying only the auth header) so the SPA doesn't need to store it.
The endpoints can be found here, under "New Marketing Campaigns"
https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact
Currently the SPA is storing the API key in local storage and makes API calls directly SendGrid URLs sending the API key in the authorization header. This however is not secure.
To secure the calls I will need to use my ASP.net Core API backend, however duplicating & implementing every SendGrid Endpoint seems unnecessary if only the authorization header is modified
This project deliverable to is provide a working sample of a ASP.NET Core API Proxy which works with ASP.NET Core 3.1.
Create an API project (Target Framework = .NET Core 3.1)
Add JWT Token Authentication in the ConfigureServices / Startup.cs
Add a value in the config.json file to keep the sendgrid API Key
Configure the solution / proxy such that requests/responses are passed/returned to my API (modifying only the auth header) so the SPA doesn't need to store it.
The endpoints can be found here, under "New Marketing Campaigns"
https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact