I am working on scalr and trying to access scalr api using postman client but I have getting error:
{
"meta": {
"requestId": "63b814f1-f885-48cc-85d6-762e524e0bfb"
},
"errors": [
{
"code": "BadAuthentication",
"message": "Unsigned request"
}
]
}
For scalr api they have given Access keyid:xxxxxxx and secret key: xxxxxxxx so I am using basic auth for authentication process and giving:
username:(scale key id)
password:(scalr secret_key)
Scalr apis working fine with scalr api interface but throwing error with postman client.
Please suggest me what is the problem.
If you are using the API v1 (deprecated) that is currently available in Scalr Open Source, you need to get the signature from your user profile as described in the documentation.
If you are using Scalr Enterprise which supports the current API v2, authentication is described in the API Explorer.
Related
I am using WSO2 IDM server and working on using SCIM API's available.
When I invoked the get groups SCIM API https://localhost:9443/wso2/scim/Groups, I am getting error in response
{
"Errors": [
{
"code": "404",
"description": "Groups not found in the user store."
}
]
}
I created few users and roles under 'PRIMARY' user store.
However I am able to successfully invoke the get users API.
WSO2 Version: 5.11
Please let me know if I am missing configuration.
Regards,
You have used scim v1 APIs for user and group retrieval.
Can you please try scim2 APIs (This is recommended).
List groups: https://localhost:9443/scim2/Groups
List users: https://localhost:9443/scim2/Users
refer: https://is.docs.wso2.com/en/latest/develop/scim2-rest-apis/#/scim-20-api-definition
I tried the demo at https://cloud.google.com/video-intelligence/
If I switch to the API tab I can see the request is
https://videointelligence.googleapis.com/v1/operations/projects/4808913407/locations/us-east1/operations/12700896084805575820?key=YOUR_API_KEY_HERE
However, when I try doing the same operation using my API key I get
{
"error": {
"code": 403,
"message": "The caller does not have permission",
"status": "PERMISSION_DENIED"
}
}
Do I need to configure the API key in any specific way to get this working?
Video Intelligence does not support API Keys, you need to authenticate using a service account. Here you can find the list of GCP services that support API Keys.
Here you can find a description step-by-step on how to use video intelligence using the command line.
As you can see you need to generate a print access token after configuring your service account credentials. Then you include it in the API call as "Authorization: Bearer". You cannot use an API key.
I am trying to test out the vision API and have uploaded some images to Google cloud storage and have created a browser app that requests the cloud api to process them.
I have a client_id file that I downloaded from the Google developers console. This has a client_id value that I am using as my api key.
I make a request to
https://content-vision.googleapis.com/v1/images:annotate?alt=json&key=414712345643-cln7htsuv78jr9i64v8v7g6cnhm3ccff.apps.googleusercontent.com
(api key altered)
and post the request:
{
"requests": [
{
"image": {
"source": {
"gcsImageUri": "https:\/\/console.cloud.google.com\/m\/cloudstorage\/b\/estoril_test\/o\/AI4C3160.JPG"
}
},
"features": [
{
"type": "LABEL_DETECTION",
"maxResults": 1
}
]
}
]
}
but I get an error:
{
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developer console API key",
"url": "https://console.developers.google.com/project/414754136843/apiui/credential"
}
]
}
]
}
}
I have authorized that api key for the cloud vision api so what am I doing wrong? I did try the curl example in the demo but I keep getting
Protocol https not supported or disabled in libcurl
I tried adding double quotes as some research suggested I should but still no luck.
For the "API key not valid" issue, it appears that you are using a Server key, but you need to use a browser key. The Vision API Getting Started page has detailed screenshots, as well as a curl example.
The second issue you are likely to encounter is that the gcsImageUri is the incorrect format. According to the Vision API reference docs the image URI must be in the form "gs://bucket_name/object_name", so in your case: something like: "gs://storil_test/AI4C3160.JPG"
Another problem that can be encountered with a KEY not working is that a particular service has not been added to the project you are trying to work with. That will give this same response.
Problem is resolved.
After generating credentials, Click on 'Create Credentials' Drop down and choose - 'API Key'; the generated API Key will be used..
key=414712345643-cln7htsuv78jr9i64v8v7g6cnhm3ccff.apps.googleusercontent.com
This is "ID client Oauth" key.
sAjnhsejklfynGiuhYGBYUGDYGziodzdCfhAO7qPY
This is an exemple of valid API KEY
To create API KEY follow this link :
https://support.google.com/cloud/answer/6158862?hl=en
I am trying to use the QuickBooks REST API by carrying out a test API call. I am adding my own application token and consumer token, however receiving the following error:
{
"Fault": {
"Error": [
{
"Message": "message=Exception authenticating OAuth; errorCode=003200; statusCode=401",
"code": "3200"
}
],
"type": "AUTHENTICATION"
},
"requestId": "999c6895a5cf42a1aeaacc43bf600cca",
"time": "2015-06-08T19:57:10.669Z"
}
The OAuth string is in the following format: Authorization : OAuth oauth_token="************",oauth_nonce="39316429-ad1d-4aa2-9ba7-d59e380878b3",oauth_consumer_key="************",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1433794011",oauth_version="1.0",oauth_signature="KIC7BXeSXVqw6C%2Fcgcb0Dlq2R40%3D"
I am substituting the "oauth_token" and "oauth_consumer_key" values with the App Token and OAuth Consumer Key values from the QuickBooks developer section, as shown below:
From what I have looked up online, the key values are expired, but that does not seem likely as I am simply copy-pasting them from that page on QuickBooks developers section.
What am I doing wrong?
EDIT: I also tried loading values from this page, after submitting my app token, however I am receiving the same exact error:
I am substituting the "oauth_token" ... with the App Token
This is incorrect. This isn't how OAuth works.
You need to go through the OAuth connection process (e.g. click the "Connect to QuickBooks" button) to get your OAuth token.
The App Token is not the same thing as the OAuth token. They are two totally independent separate values.
If you post what programming language you're using, you'll probably get more details relevant to what you're actually building in.
Our organization uses SAML for SSO into Google Apps. In order to use SSO we must manage the change password functionality through APIs. Since the Provisioning API has been deprecated in favor of the Admin SDK Directory API, I am developing against this API.
The flow I am developing is that the end user will login using Google OAuth2 into my application. Then, using the users access token I am attempting to call the https://www.googleapis.com/admin/directory/v1/users/ API to put a new password, but I get an error 403 "Not Authorized to access this resource/api".
My question is, what privilege is required for the user to be able to update their own password? When calling this API with GET I am able to retrieve my user information successfully, but trying to put a new password (or any other field for that matter) fails.
Here is an example of my request and response:
Request:
PUT https://www.googleapis.com/admin/directory/v1/users/user%40domain.org?key={YOUR_API_KEY}
Content-Type: application/json
Authorization: Bearer ya29.AHES6ZT_7onp48edpClD72X-*************************
X-JavaScript-User-Agent: Google APIs Explorer
{
"password": "wlKsf.##2af"
}
Response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
}
],
"code": 403,
"message": "Not Authorized to access this resource/api"
}
}
Only super admins, delegated admins and resellers can access the Admin SDK Directory API.
I suggest creating a delegated admin that only has access to update users via the API and then having your web application utilize an OAuth token created for this delegated admin.