When trying to update a video snippet I always get a Forbidden response - api

I am creating an app to update my videos through the youtube api v3.
I have set up everything correctly according to the documentation. Have the API key and OAuth credentials. But everytime I try to update (in my app or in the API test page) I get this json response:
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/videos?part=snippet&alt=json returned "Forbidden". Details: "[{'message': 'Forbidden', 'domain': 'youtube.video', 'reason': 'forbidden'}]">
I'm getting so frustrated, this specific error only shows "Forbidden" with no extra info.
Does anyone knows what it could be? Thank you
X

Related

Can't access Chorus Pro API in Postman

I'm working on a custom module for Odoo 15, but I'm currently facing an issue with the Chorus Pro API.
Everything about authentication and API key generation looks ok on their website.
But when I try some requests in Postman it always returns me "400 Bad Request" and I don't understand why.
Can someone help me ?
Thanks.
Update 1
Ok so after several tests it return me "Unable to find token in the message".
But I specified it in the Authorization menu with type API Key.
Here the official documentation: https://developer.aife.economie.gouv.fr/index.php?option=com_apiportal&view=apitester&usage=api&apitab=tests&apiName=Factures&apiId=5feff6ae-09cd-46a6-a0b9-844eac6b9acc&managerId=2&type=rest&apiVersion=1.0.0&Itemid=265&swaggerVersion=2.0&lang=fr
(Sorry it's in french)
Update 2
I finally get an API Key and change the Authorization Type to Bearer Token so the previous error is solved.
But now I've got "403 Forbidden" because of an "[invalid field]".
I use this POST URL : https://sandbox-api.piste.gouv.fr/cpro/factures/v1/corriger/valideur/facture
With this body :
{ "idFacture": 0, "idStructure": 0, "typeIdentifiantStructure":
"SIRET", "identifiantStructure": "string" }
Update 3
The "[invalid field]" seems to be the host one, but it's the same as in the POST URL : sandbox-api.piste.gouv.fr

Video of Youtube Data API V3 do not operate for a few hours

Youtube API do not work for a few hours regarding videos.
I checked autorization of API and tried to access with my key value regarding address below.
https://youtube.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&maxResult=25&key=[my key value].
However, output is whether or not error is displayed on console tab. error message is that Failed to load resource: the server responded with a status of 403 (Forbidden).
The portion of error is higher than no error for a few hours.
Could you let me know the root cause about this situation?

GET request to opensea API giving 403 error

I'm trying to retrieve the asset info from a specific collection using the asset endpoint.
Example:
https://api.opensea.io/api/v1/asset/0x1a92f7381b9f03921564a437210bb9396471050c/2000/?format=json
Now, if you open that on your browser, it works flawlessly, but on your app or postman it just gives a 403 error by CloudFlare.
This is not a 401 error and we shouldn't need an API key for this.
So what is going on and how do I fix this? Any ideas?

Instagram Invalid Access token for non-expired token

I'm building a simple app to hit the Instagram API and display pictures. Following their docs, I redirect users to a sign-in, after which they're sent back to the app with an access_token. When I use that token to make requests, however, I get the following response:
{
"meta": {
"error_type": "OAuthAccessTokenException",
"code": 400,
"error_message": "The access_token provided is invalid."
}
}
The requested URL is:
"https://api.instagram.com/v1/media/search?lat=37.7936981&lng=-122.3966248&access_token=12345.adsf123adsf2341adsfasdfwhatever"
I've also tried putting the token within quotations, and URI-escaping the ampersands.
And I've tried this both through a script tag src and as a GET request in Postman. Unlike most of the answers I've found related to the above error, this is definitely not an expired token issue, as I run into this error immediately after getting the token. And it also appears NOT to be a case of my passing the token incorrectly, because when I remove the token altogether, I get a separate error complaining that no token or client_id has been passed.
Anyone familiar with this error? Have a sense what I might be doing wrong?

instagram api OAuthPermissionsException live mode

I'm having an issues with the new API policy of Instagram
I already got my app approved and got basic permissions
IG API Permissions
When using the app on sandbox mode I can get API response only for my own user, however when I move to Live Mode and try using the API all I receive is error 400 code
For example
https://api.instagram.com/v1/users/search?access_token=MY-TOKEN&count=6&q=world
Response
{
meta: {
error_type: "OAuthPermissionsException",
code: 400,
error_message: "This client has not been approved to access this resource."
}
}
Even using the same API with my own username still getting the same error
I was trying to search on it but all I can find is the same error happens to unauthorized users
Any idea ?
I have fixed the This client has not been approved to access this resource Issue by Authorizing the Instagram public_content scope by visiting the following URL and clicking Authorize.
https://api.instagram.com/oauth/authorize/?client_id=[YOUR_CLIENT_ID]&redirect_uri=[YOUR_REDIRECT_URI]&scope=public_content&response_type=token
I found the reason, I can't use that endpoint because I have only permission for basic. for more information https://www.instagram.com/developer/endpoints/users/