Error in IBM Cloud API PCloudInstances request - api

I am trying to make this request from IBM Cloud API: Documentation
I have successfully made other requests like pvmInstances and Volumes, so we should have the permission, but this one returns this error: {'description': 'Your access token is invalid or does not have the necessary '
'permissions to perform this task.',
'error': 'Access Denied'}.
Is there anyone who can help me please?

Verify that you can perform the actions in the IBM Cloud Console UI. If that works OK, then login using the CLI and get the tokens as described in the docs to use curl

Related

Flutter Google Sign In Couchbase Authentication Code Flow

As we are migrating our app from Firebase to Couchbase, we also need to change the authentication part. We are using the google_sign_in package and would like to continue using it to have the native Google Sign In popup. Using the package we can get a serverAuthCode, which from my understanding we can then send to the _oidc_callback endpoint of Couchbase Sync Gateway. First I had to set disable_callback_state to true in the Sync Gateway configuration ("DisableCallbackState determines whether or not to maintain state between the /_oidc and /_oidc_callback endpoints."). However, when I now send the serverAuthCode to the _oidc_callback endpoint, I get the following error with status code 500:
body: {"error": "Internal Server Error", "reason": "Failed to exchange token: oauth2: cannot fetch token: 400 Bad Request\nResponse: {\n \"error\": \"invalid_grant\",\n \"error_description\": \"Bad Request\"\n}"}
I assume it is because the login was done using the package and not through the browser with a redirect to the app afterwards. Now I have no idea how to do this correctly though, that I sign in with the google_sign_in package and then use the code to get the tokens from the Sync Gateway. I can't find any helpful information for this problem.
I would be very happy if someone could help me, possibly in a call. Maybe this way something like this can be solved faster.

DataFlow :missing required authentication credential

I am getting following error while running DataFlow pipeline
Error reporting inventory checksum: code: "Unauthenticated", message: "Request is missing required authentication credential.
Expected OAuth 2 access token, login cookie or other valid authentication credential.
We have created service account dataflow#12345678.iam.gserviceaccount.com with following roles
BigQuery Data Editor
Cloud KMS CryptoKey Decrypter
Dataflow Worker
Logs Writer
Monitoring Metric Writer
Pub/Sub Subscriber
Pub/Sub Viewer
Storage Object Creator
And in our python code we are using import google.auth
Any idea what am I missing here ?
I do not believe I need to create key for SA , however I am not sure if "OAuth 2 access token" for SA need to be created ? If yes how ?
This was the issue in my case https://cloud.google.com/dataflow/docs/guides/common-errors#lookup-policies
If you are trying to access a service through HTTP, with a custom request (not using a client library), you can obtain a OAuth2 token for that service account using the metadata server of the worker VM. See this example for Cloud Run, you can use the same code snippet in Dataflow to get a token and use it with your custom HTTP request:
https://cloud.google.com/run/docs/authenticating/service-to-service#acquire-token

Amazon Connect API didn't response correctly in Postman

I am trying to test Amazon Connect Rest API in Postman. The API name is GetMetricData. In Postman, I have provided all the required information that is mentioned in the documentation. I have provided the JSON body, URL, and Header, although API is responding 200 OK status but in the response, it is throwing the following errors that you can see in the following screenshots.
I have set AWS signature with proper credentials such as access key and secret key
In the second error it is suggesting me to enable Javascript in the browser which is already enabled in my browser.
Can someone please help me here, I don't know where I am doing wrong. As I am totally new in this field, any help would be appreciated.
Thanks
You are submitting the POST request to the UI distribution endpoint for your Amazon Connect instance, not an API endpoint. You are getting HTML and javascript response body back from the UI distribution because this is meant to be consumed by a browser.
Your API request should be sent to a URL that looks like https://connect.us-west-2.amazonaws.com/metrics/historical/<instanceId>. In this example, my Amazon Connect instance is located in the us-west-2 region so I'm using the connect.us-west-2.amazonaws.com endpoint. You can find all available Amazon Connect API endpoints in the documentation here

Getting "PARTNER_AUTHENTICATION_FAILED" error

While configuring API in Unqork(No-Code platform) getting error "PARTNER_AUTHENTICATION_FAILED" while try to fetch Signed Document.
I have used this API Endpoint - {{baseUrl}}/v2.1/accounts/{{accountId}}/envelopes/{{envelopeId}}/documents/0
And also getting file in UTF-8 format. But when trying to convert it into PDF than getting blank document.
Unqork
From google searching, it looks like this page may be of help: https://academy.unqork.com/advanced-api-authentication
In general, you need to get unqork to use OAuth with a DocuSign oauth service provider (account-d.docusign.com) to obtain an access token. Then use that access token in unqork's API calls to DocuSign.
Contact unqork's customer service group for more help.
General information on the problem
PARTNER_AUTHENTICATION_FAILED more information error message
Are you using legacy authentication or OAuth authentication? Only OAuth is supported for new integrations.
You must obtain an access token to make API calls. You can obtain an access token via OAuth.
See the docs. Or a video.
If you want more help, ask a new question and provide more information on exactly what you have tried and what is or is not working.

Gmail API- Metadata scope does not support 'q' parameter

I'm trying to use Gmail API for my web app. What I want is get messages which has attachment file and I'm following this tutoral.
The problem is when I use 'q' parameter, it return the error: Metadata scope does not support 'q' parameter
My request URL
Note: My authorize scopes are:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
The error message occurs when https://www.googleapis.com/auth/gmail.metadata is included in the scopes. But in your scopes, it is not used. So please confirm the following points again.
If the refresh token is retrieved in your script, please remove it and authorize again using the scopes without https://www.googleapis.com/auth/gmail.metadata.
If you use Google APIs Explorer, please remove Google APIs Explorer at https://myaccount.google.com/permissions.
Please login and remove it.
After you did above, please use the API of endpoint by authorizing using the scopes without https://www.googleapis.com/auth/gmail.metadata.
If this was not useful for you, I'm sorry.