HTTP_21 - OAuth2 authentication failed. Please make sure the credentials are valid - google-realtime-api

I'm implementing Google Analytics Api with StreamSet to stream real-time stats.I have given private key and jwt token correctly but always getting the same error "HTTP_21 - OAuth2 authentication failed. Please make sure the credentials are valid."
Thanks in advance.

Related

How can I get a long term refresh token for google search ads 360 api that doesn't expire?

I have created an app registration in google cloud and have managed to authenticate when using the test scope by changing the redirect url to localhost:8080 and acquiring an access token and a refresh token. The problem is that the refresh token expires when using the test scope, so I switched to the production scope, and now I get an error no matter what url I list as an authorized domain.
The only solution I can find so far is to switch back to the test environment (Google oAuth 2.0 API Authentication Error: Error 400 - redirect_uri_mismatch (does not comply with policy) DJANGO APP), but that doesn't work for me for the reasons above.
Does anyone know how to get a permanent refresh token in production scope for sa 360?
Any help would be much appreciated.

Error Code 401 while using Server Side Huawei Mobile Service API for app level access token

From yesterday I am facing this error code 401 while accessing token from server using this API: https://oauth-login.cloud.huawei.com/oauth2/v3/token
Just for your information I am using Postman. Can anybody help me with this.
Error 401 usually means “unauthorized” or “request denied” because a request lacks valid credential. Although this error code is not listed in Account Kit server api, a developer can find it in other kit document - https://developer.huawei.com/consumer/en/doc/development/HMSCore-References-V5/webapi-error-code-0000001050163432-V5. Basically, a developer need to make sure that their API key and/or token is valid.
while using huawei auth service if error code 401 returned it means access token becomes invalid and we need to obtain a new token. Token Validity is 60 mins.

How to Configure OAuth2 Authentication for Apache Kafka Cluster using AZURE AD

due to the lack of INTROSPECT_ENDPOINT in azure AD, I am unable to validate the token.
How to validate the Azure Access token in Java?
Usually, the ADAL or the MSAL SDK will take care of it. But, you can still manually validate the access token you get. Here is the official tutorial: Validating tokens.
In summary, there would be 3 steps:
Get the kid in token header, and the tid in token payload.
Get all sign keys from https://login.microsoftonline.com/{tid_here}/discovery/v2.0/keys, and find the key with kid
x5c in the key is the public certificate. You can use it to verify the signature of a token.

GSuite : Client is unauthorized to retrieve access tokens using this method

Hi I'm trying to develop an for GSuite admin which enables to migrate their google drive data to another cloud service. But in the process of authentication i'm getting the below error.
{
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method."
}
Below are the api's that are enabled in developer console.
1. Admin SDK
2. Contacts API
3. G Mail API
4. Calendar API
5. Drive API
Please guide me if done anything wrong in creating an app.
The main thing what i missed here is Authorizing my service account client ID with the GSUITE admin.
And I have been trying to generate access_token for the expired domain of mine.
After clearing all these i have to success in generating and getting user data.
This solution worked for me. I hope it works for you tooo....
Thank you community.

Google Cloud storage PUT with API KEY using node.js

I am trying to put a file into Google Cloud Storage by using API KEY. What is the proper way to do it?
I am put into an address of
"https://storage.googleapis.com/my_test?key=AIzaSyD5TnLAX6N_xAuSudUYSS6k1j8UxfaV9YN"
However, I got an error saying I am missing a required header. What should be the proper way to do this?
Thanks.
Server responded with: MissingSecurityHeader; Your request was missing a required header: Authorization
An API key is not an authentication mechanism. See the Authentication page for the supported authentication methods. Namely:
OAuth 2.0
Cookies
Service Accounts