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
Related
So basically all I want is for Google vision to identify an Image of mine...
I send the following request:
to: https://vision.googleapis.com/v1/images:annotate?key=
With Data:
{"parent":"", "requests":[ {"image":{"content":"<MY IMAGE>"}, "features":[ {"type":"LABEL_DETECTION", "maxResults":"1"} ]} ]}
But for some reason the response I get is:
404. That’s an error.
The requested URL /v1/images:annotate?key=AIzaSyCBqsHq5Ezvd8WVMnpHYWtptqxVXToLEds was not found on this server. That’s all we know.
What's wrong with this one?
if you will use postman to end you receive " "message": "API key expired. Please renew the API key.","
So please renew the API key.
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
I'm trying to make a request to Marvel API on Postman but I got Error code: 401
{
"code": "InvalidCredentials",
"message": "The passed API key is invalid."
}
I used this website to get a timestamp and use this to get MD5 hash
I send in the request these parameters
apikey,ts,hash as mentioned here but still got the error
I tried to add my IP to authorized referrers as mentioned in this answer but it wouldn't help too
I was having this problem as well.
The following helped me:
Straight from the My Developer Account, after adding your IP address in the additional referral, I clicked interactive document.
Not sure if you still need the answer, but that's how I got mine to work.
Hello Microsoft/Azure/Skype experts,
I'm tasked with accessing presence data from Skype For Business Online accounts from my macOS app (native).
I'm unfortunately stuck and i always get a 403 error when i access the autodiscover request and never get the link to the applications resource
I have been following this documentation
https://learn.microsoft.com/en-us/skype-sdk/ucwa/authenticationusingazuread
STEP 1
We have registered the app in the Azure Management Portal using our Office 365 account credentials.
We have used custome redirect URL (http://localhost)
Allow Implicit Flow is set to true in manifest
We pre-configure the permissions needed for Skype for business
online
STEP 2
Issuing a GET as specified in the documentation to initiate sign in and authorization check.
GET https://login.microsoftonline.com/common/oauth2/authorize?response_type=token&client_id=c#####-4d41-485e-871f-0a22aa79e52b&redirect_uri=http://localhost
This returns a 200 OK.
STEP 3
We got the Auto discover URL as described in the documentation.
This is what i get - i use the domain marked in RED.
STEP 4
As per the documentation, they ask me to do this
Requesting an access token using implicit grant flow
So i issue a GET as described
https://login.microsoftonline.com/oauth2/authorize?
response_type=id_token &client_id=######-4d41-485e-871f-0a22aa79e52b
&redirect_uri=http://localhost
&state=8f0f4eff-360f-4c50-acf0-99cf8174a58b
&resource=https://webdirin1.online.lync.com
Now this shows the sign in page, i sign in and then it throws an error
AADSTS90014%3a+The+required+field+%27nonce%27+is+missing.
I researched and could not fix this error.
So after lots of research and looking at this Microsoft documentation LINK (https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#requesting-individual-user-consent) , apparently there is another way of getting the bearer token.
STEP 4 - SECOND TRY
I then Request individual user consent by sending the SCOPE parameter for Skype for Business.
I then issue a GET request to
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=#######-4d41-485e-871f-0a22aa79e52b&response_type=code&redirect_uri=http://localhost&response_mode=query&scope=https://api.skypeforbusiness.com/User.ReadWrite&state=12345
This returns an access code which i use in next step to get the TOKEN
STEP 5 - Get the bearer TOKEN
Issue a POST to following URL
https://login.microsoftonline.com/common/oauth2/v2.0/token With the
following data in POST body
"grant_type": "authorization_code", "client_id":
"######-4d41-485e-871f-0a22aa79e52b", "scope":
"https://api.skypeforbusiness.com/User.ReadWrite", "code":
"OAQABAAIAAACEfexX.........", "redirect_uri": "https://localhost"
This returns the bearer token in the following response JSON
{
"access_token" = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1........w4b-- gnWG_iOGtQ";
"expires_in" = 3599;
"ext_expires_in" = 3599;
scope = "https://api.skypeforbusiness.com/User.ReadWrite";
"token_type" = Bearer;
}
STEP 6
Yay! Got the bearer token at laaast!
Now back to the main documentation
https://learn.microsoft.com/en-us/skype-sdk/ucwa/authenticationusingazuread
And where we do this - 'Resending an autodiscovery request with the bearer token'
We execute a GET request to
https://webdirin1.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user
Now this, as per the documentation should return this JSON
{
"_links":{
"self":
{"href":"https://webdirX.online.lync.com/Autodiscover/AutodiscoverService.svc/root/user"},
"applications":
{"href":"https://webpoolXY.infra.lync.com/ucwa/oauth/v1/applications"}
}
}
BUT i GET A 403: PERMISSIONS denied error
<div class="content-container"><fieldset>
<h2>403 - Forbidden: Access is denied.</h2>
<h3>You do not have permission to view this directory or page
using the credentials that you supplied.</h3>
</fieldset></div>
So thus i have never got the applications url and I have checked the manifest, registration and i have no idea, why i get this error.
Any inputs would be appreciated.
For step 4, you need to specify nonce=somestring in the URL. Typically this should be a securely random value that is only used once. It can contain any value.
Also, you are only requesting an id token. Set response_type=id_token+token.
I'm attempting to POST data to a shopify store via a proxy page. I have been able to GET data via the URL on a proxy page but I have been getting the same error over and over again when attempting to POST data.
The error is:
{
"errors": {
"fulfillment": "Required parameter missing or invalid"
}
}
However the API states that I can POST data to a URL like the one below (I've masked the URL a bit to protect security Info) http://docs.shopify.com/api/fulfillment#create
https://XXXXXXX:XXXXXXX#XXXXXXX.myshopify.com/admin/orders/238974545/fulfillments.json
The data that I am attempting to post is:
{
"fulfillment":{"tracking_number":"9405510200881104822769","notify_customer":
false}}
Has anyone experienced this? If so how have you overcome this?
I was getting this same error. Here: https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/fulfill-by-api-190660#comment-190683 shopify support recommended that you specify the header Content-type as application/json in your http request. I did this and it fixed the problem.