How do I access google pubsub topic by apigee

i want to GET data from google pubsub topic by apigee api. I already have an api ready.

Can it be done?

You can use Google Cloud Pub/Sub Extension:

https://docs.apigee.com/api-platform/reference/extensions/google-cloud-pub-sub/google-cloud-pub-sub-extension-121

Thanks.But it is for publishing .Can we get?

but it depends on your use case and your reading of pub/sub subscription documentation.

One example, as per

https://cloud.google.com/pubsub/docs/push

configure a pubsub webhook for the proxy endpoint that will be receiving messages from your topic.

PUT [https://pubsub.googleapis.com/v1/projects/myproject/subscriptions/mysubscription](https://pubsub.googleapis.com/v1/projects/myproject/subscriptions/mysubscription)
{"topic":"projects/someproject/topics/sometopic"// Only needed if you are using push delivery"pushConfig":{"pushEndpoint":"https://<your api proxy handler>"}}

When i am trying to set up push type subscriber it gives me pubsub error INVALID_ARGUMENT.I am using my own free account.What is the work around for the same?

I have posted steps to setup the subscriber in the https://community.apigee.com/questions/65025/has-anyone-done-a-poc-to-connect-google-pubsub-to.html