Call Github GraphQL API using c#

preview_player
Показать описание
How to call Github Graphql API using c#?

Have you ever received this message?

System.Net.Http.HttpRequestException: 'Response status code does not indicate success: 403 (Forbidden).'

Avoid 403 forbidden status code when you call GitHub GraphQL API (Sending request with Basic Authentication and User-Agent).

How to create a Github personal token?

Code snippet (Github gist):

Thanks for watching!
Рекомендации по теме
Комментарии
Автор

Hi there! Just wanted to say thank you for this video!
I tried everything for two hours, had token authentication set up correctly, but the GitHub API kept returning 403 because I forgot to set my User-Agent in the request. Well... lesson learned. 😂

JohnHackfresse
Автор

i am stuck when i want to convert graphQL response into a datatable in c#, Can you please help me on it?

abusiddik
Автор

Is using a GraphQl client any better than using a standard http client?

puravupadhyay
Автор

hi, this is very good. can you please send this source code to me?

abusiddik