Using Sensor Attribute in Restful-Sensor

Hi,
i am planing to send a attribute of a sensor as an payload with an restful-sensor.

the attribute looks like this:

my restful-sensor looks like this:

sensor:
  - platform: rest
    resource: "http://192.168.0.108"
    method: POST
    headers:
      Content-Type: "application/x-www-form-urlencoded;charset=UTF-8"
    payload: "text" + {{states.sensor.aws_test.attributes.refresh_token}} + "text"
    json_attributes:
      - access_token
    value_template: ":D"
    name: AWS_Incoming
    scan_interval: 3000

I doesn’t work this way and I tried many different options I found on the community, but no success…

Try:

payload: >
  {{"text" ~ state_attr("sensor.aws_test", "refresh_token") ~ "text"}}

EDIT: Ignore this. The payload field isn’t templateable.