Gatling Scala:Unable to send auth token to the method using session variable

i am using Gatling 3.3 version and It seems session variable used in below code is not able to pass the Token Type → Bearer and access_token using session variable,here is the full code ,is it possible with you to have a look ,here is code provided …no worries all tokens are dummy tokens as i haven changed before pasting code here.Test expects the login method to be executed first and then the CreatePrivateEvent method as the latter takes tokens from Login method hence i have written

From Logs It looks Token Type → Bearer and access_token are successfully generated by Login Method but the same token is not propagated to CreatePrivateEvent method.

any other way you can suggest to use session variable would be highly welcomed?

package simulations

import baseConfig.BaseSimulation
import com.jayway.jsonpath.JsonPath
import io.gatling.core.Predef._
import io.gatling.core.session
import io.gatling.http.Predef._

import scala.concurrent.duration._
import scala.concurrent.forkjoin.ThreadLocalRandom
import scala.language.postfixOps
import scala.math._
import scala.concurrent.duration.DurationInt

class gamekeeper extends BaseSimulation {

  val uri2 = ""

  val headers_3 = Map(
  "accept" -> "application/json, text/plain, */*",
  "cache-control" -> "no-cache",
   "origin" -> "",
   "pragma" -> "no-cache",
   "referer" -> "",
    "sec-fetch-mode" -> "cors",
  "sec-fetch-site" -> "same-site")

  val headers_10 = Map("Content-Type" -> "application/json","Authorization" -> "${token_type} +    
  ${access_token}" )

  val headers_PrivateEvent = Map(
   "Content-Type" -> "application/json",
    "Authorization" -> "${token_type} + ${access_token}"


val usersDataSource=jsonFile("C:/Gatling2/gatling3james/src/gatling/resources/data/input-  
val nameDataSource=jsonFile("C:/Gatling2/gatling3james/src/gatling/resources/data/input-

 val source: String = Source.fromFile("C:/Gatling2/gatling3james/src/gatling/resources
  def userCount: Int  = JsonPath.parse(source).read("$.[0].user")
 def testDuration: Int  = JsonPath.parse(source).read("$.[0].testDuration")
 def rampDuration: Int  = JsonPath.parse(source).read("$.[0].rampDuration")

  // print out the properties at the start of the test
  before {
  println(s"Running test with ${userCount} users")
    println(s"Ramping users over ${rampDuration} seconds")
  println(s"Total Test duration: ${testDuration} seconds")

 def createPrivateEvent()={

    exec(http("Create Private Event")


          >  "eventId": 0,
          >  "name": "new Event",
          >  "description": "This event is gonna be uh-maaaazing",
          >  "format": "draft",
          >  "gamesToWin": 2

      .check(jsonPath(path="$.name").is("new Event"))


  val login = exec( exec(http("PlatForm Auth Url")
  .post(uri2 + "/auth/oauth/token")
  .formParam("grant_type", "password")
  .formParam("username", "")
  .formParam("password", "c0Ba5PBdvVl2")


  val scenario4 = scenario("Create Private Events ").exec(login).exec(createPrivateEvent())


  nothingFor(5 seconds),
  rampUsers(userCount) over ( rampDuration ))

Here is detailed Gatling console logs:-

Why did you put a ‘+’ in here???

"${token_type} + ${access_token}"

Excellent ,worked like a charm,Thank you a Ton