Read sheet2api with credentials

Anonymous
2023-11-28T16:19:50.93+00:00

I am used sheet2api to convert spreadsheet to api.

I used the below credentials.

user id : test

password :test

https://sheet2api.com/docs/UHC796KdSvqC/testsp

As per their documentation here is the instructions to read api can you give an equivalent C# MAUI Blazor code

Authentication

If you have configured your API to require authentication then all requests will need to include an Authorization header.

The credentials are constructed like this:

The username and the password are combined with a colon (aladdin:opensesame).

The resulting string is base64 encoded (YWxhZGRpbjpvcGVuc2VzYW1l).

That string should when be included within the Authorization header:

Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,672 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,119 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 76,351 Reputation points Moderator
    2023-11-28T18:41:03.2533333+00:00

    That is standard basic authentication. Most likely the site does not support CORS. because blazor runs in a webview, it requires CORS support to call a webapi.

    you will probably need to proxy the calls via the hosting app. you can probably use the access to the blazor services to inject into a service a proxy.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-12-15T19:42:22.82+00:00

    Closing the question as the free api has some limits

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.