Share access

There are two ways to share an Account, which depend on the person you'd like to give access:

Share access using the RoleAssignmentService

You can use accounts.roleAssignments.create to share an Account with other Waze credentials (that is, a user who has already logged into the Waze Advertisers Dashboard). A RoleAssignment defines the permissions a user has for a specific Account. Permissions are encapsulated within one of the following Role instances:

  • The VIEWER Role grants read permissions.
  • The EDITOR Role grants read and write permissions.

Share an Account

To share an Account with other Waze credentials, you must pass the following to accounts.roleAssignments.create:

  • The email of the Waze credentials you want to give access.
  • A Role.

The following query grants read-only access to the Waze user grace@gmail.com.

curl -X POST https://ads.wazeapis.com/v1/accounts/ACCOUNT_ID/roleAssignments?key=API_KEY \
  -H 'Authorization: Bearer WAZE_ACCESS_TOKEN' \
  -d '{
    email: "grace@gmail.com",
    role: "VIEWER"
  }'

The Role is granted immediately. The user with the email can read or write to the Account with ID ACCOUNT_ID.

To share all your accounts with a given email, call the list method and then call accounts.roleAssignments.create for each account returned in the paginated response.

Retrieve accesses

To retrieve all the other Waze users that have access to the Account, call the list method. You must have the EDITOR Role to call this method.

Share access using the InvitationService

You can use accounts.invitations.create to invite a Google Account to obtain permissions over an Account. Similarly to the RoleAssignment resource, permissions are encapsulated within one of the following Role instances:

  • The VIEWER Role grants read permissions.
  • The EDITOR Role grants read and write permissions.

Create an Invitation

To create an Invitation to an Account, you must pass the following to accounts.invitations.create:

  • The email of the person you want to give access.
  • A Role.

The following query creates an Invitation for alan@gmail.com to get read and write access to ACCOUNT_ID:

curl -X POST https://ads.wazeapis.com/v1/accounts/ACCOUNT_ID/invitations?key=API_KEY \
  -H 'Authorization: Bearer WAZE_ACCESS_TOKEN' \
  -d '{
    email: "alan@gmail.com",
    role: "EDITOR"
  }'

Invitation resources expire after 28 days.

When you create an Invitation, you need to provide your invitee the accept_uri of the Invitation. The accept_uri takes them to the Waze Advertisers Dashboard where they're prompted to accept the Invitation. Then they're granted permissions over the Account specified. A RoleAssignment resource is created to specify that they have a Role over the Account.