How to get dummy google access token to test oauth google api

前端 未结 4 1181
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 01:20

Is there any way in which I can generate access token to test oauth for logging in with gmail?

I have created a google app, and got the client and secret ids.

4条回答
  •  借酒劲吻你
    2020-12-29 02:05

    If you just want to test out an API with any oauth token as stated in the question title (not necessarily one acquired from a test user login flow), then you could make curl calls using a service account and the oauth2l utility as outlined in GCP docs here:

    https://cloud.google.com/service-usage/docs/getting-started

    Similarly, you can grant permissions to the service account the same as you would a regular test user.

提交回复
热议问题