Comments (3)
Hi,
You can set HttpClient and set timeout:
var httpClient = new HttpClient
{
Timeout = TimeSpan.FromSeconds(10)
};
InstaApi = InstaApiBuilder.CreateBuilder()
.SetUser(userSession)
.UseLogger(new DebugLogger(LogLevel.Exceptions))
// set httpclient
.UseHttpClient(httpClient)
.Build();
from instagramapisharp.
Grateful.
but after set this, LoginAsync Returns:
An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set
from instagramapisharp.
Ops,
You should set two other thing!
HttpHandler, and set instagram api endpoint
var httpHandler = new HttpClientHandler();
var httpClient = new HttpClient(httpHandler)
{
BaseAddress = new Uri("https://i.instagram.com/api/v1/"),
Timeout = TimeSpan.FromSeconds(15)
};
InstaApi = InstaApiBuilder.CreateBuilder()
.SetUser(userSession)
.UseLogger(new DebugLogger(LogLevel.Exceptions))
.SetRequestDelay(RequestDelay.FromSeconds(0, 1))
// set httpclient
.UseHttpClient(httpClient)
// set HttpClientHandler
.UseHttpClientHandler(httpHandler)
.Build();
from instagramapisharp.
Related Issues (20)
- Initialization from cookies
- GetFullUserInfoAsync "Unexpected character encountered while parsing value: <. Path '', line 0, position 0." HOT 4
- Upload Photo
- API asking for challenge when I dont need to do it
- full_detail_info (GetFullUserInfoAsync) Return (404 Not Found) HOT 3
- When I try to upload a photo with an image, it does not work. HOT 1
- Bad request of SendDirectPhoto
- NullReferenceException when trying to login on macOS and iOS (MAUI) HOT 4
- current user get logged out and I have to delete state.bin every time to re-login.
- Banned account got LimitError status on logging
- Challenge Required Error when trying to login HOT 5
- Instagram HOT 5
- It does not receive the media share HOT 1
- How to list only unread direct messages (DM) #59 HOT 1
- UploadStoryPhotoAsync for stories doesn't seem to work properly
- Upload video is not working and giving me 500 error "internal server error" HOT 1
- Direct template message
- How to mark DM messages as read HOT 1
- How to mark DM messages as read HOT 2
- Fix issue with auto_expand_chaining
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagramapisharp.