Open Dlas1212 opened 2 years ago
+1
+1
same happening with me
As far as I can tell there's an issue with the redirectUrl Still haven't figured how to solve it.
What I noticed is that when it's first time I logged into IG then it worked just fine, and if it's second attempt so browser kinda had already remembered my account - it failed with 403.
I suppose it is the cookies issue, as it returned html page with the text that said smth about cookies
couple times.
What I noticed is that when it's first time I logged into IG then it worked just fine, and if it's second attempt so browser kinda had already remembered my account - it failed with 403.
I suppose it is the cookies issue, as it returned html page with the text that said smth about
cookies
couple times.
I don't think so, because I tried with props incognito
but it still gets that issue.
+1
Adding to all the above comments. This issue comes only for Android. It works perfectly fine for iOS every time. Even it works every time on Postman too.
@sujay-bidchat were you able to find a solution for this?
@nimit07 I have found a workaround for this issue. You can send the "code" to BE (Back End) and let them get the access_token for you. This is what I've done.
@sujay-bidchat were you able to find a solution for this?
Having the same issue. Any workaround or Fix?
Workaround that I ended up using is this
I have done the same as mentioned above.
does anyone have a solution?
Try in a this way:
const data = {
client_id: clientId,
client_secret: clientSecret,
grant_type: 'authorization_code',
redirect_uri: redirectUri,
code: authorizationCode,
};
const url = 'oauth/access_token';
const api = axios.create({
baseURL: 'https://api.instagram.com/',
withCredentials: false, // Disable automatic handling of cookies
});
const config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
},
};
api
.post(url, new URLSearchParams(data).toString(), config)
.then((response) => {
console.log(response);
// Handle the response containing the access token
const accessToken = response.data.access_token;
// Use the access token to make further API requests
// ...
})
.catch((error) => {
console.log(error);
// Handle any error that occurred during the request
});
Calling 'https://api.instagram.com/oauth/access_token' returning Forbidden 403. Started yesterday randomly.
I am on the latest version too.