---
title: "POST /v1/billingAccounts/{billingAccountsId}:testIamPermissions"
method: POST
path: "/v1/billingAccounts/{billingAccountsId}:testIamPermissions"
tags: ["billingAccounts"]
---

# POST /v1/billingAccounts/{billingAccountsId}:testIamPermissions

`POST /v1/billingAccounts/{billingAccountsId}:testIamPermissions`

## Request

- Base URL: `https://cloudbilling.googleapis.com`
- URL: `https://cloudbilling.googleapis.com/v1/billingAccounts/{billingAccountsId}:testIamPermissions`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-billing`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-billing`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-billing.readonly`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-billing.readonly`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.

## Path parameters

- `billingAccountsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  - `permissions` string[]: The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).

## Response `200`

Successful response

- TestIamPermissionsResponse: Response message for `TestIamPermissions` method.
  - `permissions` string[]: A subset of `TestPermissionsRequest.permissions` that the caller is allowed.

## Changes

- **2026-12-05** `6302c90d8633`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-billing` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-billing` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/cloudbilling/changes/v1/billingAccounts/:billingAccountsId:testIamPermissions/post.md)

---

[API](https://skmtc.dev/google/apis/cloudbilling.md) - [All operations](https://skmtc.dev/google/apis/cloudbilling/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/cloudbilling/revisions/6302c90d8633?raw)
