Related

How can i use Google Drive API from a CLI (without browser) and using OAuth2?

Is it possible to authenticate and get the access token only using CLI? I don't have a browser (for the OAuth2 consent part) and i need to authenticate and request resources using the REST API.
The short answer is no. Google OAuth for User Credentials is performed by a web browser.
If you also have a Google Cloud account, there are ways to create OAuth Access Tokens, but these are short-lived (3600 seconds). Then there is G Suite Domain-Wide delegation that uses a Google Cloud Service Account.
I wrote an article on how to do OAuth using curl but this still requires a web browser, but you can save the tokens and use on a remote device. link.

API for creating Service credentials in IBM COS

I am using IBM COS for various bucket operations. While I could find various ways of programmatically performing various bucket operations, I was wondering if there are any ways of programmatically(any sdk or rest apis) creating Service credentials as well as editing the policy for a service id?
Yes, there are APIs available to access and manage Cloud IAM
Go to the following API docs to review the available APIs:
IAM Identity Services API
IAM Access Groups API
IAM Policy Management API
Gaurav,
See this doc page to provision an instance of IBM Cloud Object Storage
https://cloud.ibm.com/docs/services/cloud-object-storage/basics/developers.html#provision-an-instance-of-ibm-cloud-object-storage

Apache Nifi: use OAuth 2.0 to Access Google Analytics APIs

I try to use OAuth 2.0 to Access Google APIs (Google Analytics API v4) in Apache Nifi.
I using Service Account basing on this document: https://developers.google.com/identity/protocols/OAuth2ServiceAccount
There is one specific moment if using OAuth 2.0 for Service Account (Google API):
These service-account scenarios require creating and cryptographically signing JSON Web Tokens (JWTs).
The best example of OAuth access will be using NiFi + JWT:
Create a JWT
Request an access token from the Google OAuth 2.0 Authorization Server
Handle the JSON response from Authorization Server
Point 1 (about JWT) is most interesting.
Are there any examples of already implemented flows exactly For Google Analytics?
Thanks
I don't know of any specifically for Google Analytics, but there are plenty of examples of OAuth 1.0/2.0 access using Apache NiFi. In general, you will use the InvokeHTTP processor to perform GET/POST/etc. HTTP operations against the remote endpoint.
Without specifying an issue you are encountering, I would suggest you read these articles:
HCC: Using GetHTTP for Salesforce Integration with OAuth2.0 authentication parameter
OAuth 1.0A with Apache NiFi (Twitter API example)
How to set Twitter OAuth attributes to InvokeHttp processor for fetching twitter user profiles
NiFi OAuth 2.0 Template
Google Vision & Apache NiFi - Making Advanced Computer Vision Feasible

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.

is it possible to retrieve the app/service usage information ( the fee/the money) via api?

Is it possible to retrieve the app/service usage information ( the fee/the money) via api?
I noticed that my current cf command 's version is 2.40.0
API endpoint: https://api.ng.bluemix.net (API version: 2.40.0)
I checked the api list and cannot find any useful information about my request.
Billing information for Bluemix services and application usage is not available through an API; it is only available through the Bluemix console. However, feel free to submit the request on the IBM Bluemix Ideas site for future consideration. Bluemix Project Management reviews the ideas regularly.
Using CF CLI you could use:
cf curl /v2/organizations/ORG_GUID/summary
to retrieve the org guid you can use
cf org <orgName> --guid
This provides you information about the number of services and applications, and the memory usage.