Reputation: 9
I get a JSON response from a Post request
{
"access_token": ".u9H5YgCCoMJHTW6SgVMxJe2aUEGHpMBbUf1456Gkj28",
"token_type": "bearer",
"expires_in": "4319",
"scope": "READ "
}
I want to take this access token and pass it in another GET API request as the following.
And header Authorization = token
what i did ? first post api
* def response.access_token = token
Given url ''
And header Authorization = token
This is not working
Upvotes: 1
Views: 117
Reputation: 58088
I think you got confused with the syntax, both the below will work:
And header Authorization = response.access_token
or:
* def token = response.access_token
And header Authorization = token
Upvotes: 1