# Method: dynamicProfiles.generateCode

- [HTTP request](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.request_body)
- [Response body](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.response_body)
  - [JSON representation](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.DynamicProfileGenerateCodeResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#body.aspect)
- [Try it!](https://developers.google.com/doubleclick-advertisers/rest/v5/dynamicProfiles/generateCode#try-it)

Generates code for a dynamic profile, which will need unescaping.

### HTTP request

`GET https://dfareporting.googleapis.com/dfareporting/v5/studio/dynamicProfiles/{dynamicProfileId}/generateCode`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `dynamicProfileId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Dynamic profile ID. |

### Request body

The request body must be empty.

### Response body

Response message for DfareportingDynamicProfiles.GenerateCode.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "code": string } ``` |

| Fields ||
|---|---|
| `code` | `string` Generated code for the dynamic profile. The code will need to be unescaped. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/dfatrafficking`