Reputation: 1
Upvotes: 0
Views: 1234
Reputation: 706
This issue has a checklist of things to check for the error you are getting.
Using Refresh Token Exception { "error" : "invalid_grant" }'
Hope it helps.
I think the issue might be with the missing bearer type prefix, try extracting the bearer type as well
Information won from the following source: https://security.stackexchange.com/questions/108662/why-is-bearer-required-before-the-token-in-authorization-header-in-a-http-re
Upvotes: 0
Reputation: 168157
My expectation is that you need to use access_token
, not the refresh_token
. Refresh Tokens are required only when your access token is expired as requesting a new access_token using the refresh_token
is a way faster and easier than doing full authentication.
Also be aware that it's better to use JSON Extractor to deal with JSON data, the relevant JSON Path query will be as simple as
$.access_token
See API Testing With JMeter and the JSON Extractor article for more information if needed.
Upvotes: 0
Reputation: 1999
You have use regular expression to fetch data from "Response Message". Instead, you need it from "Body". Change "Field to Check" from "Response Message" to "Body" in regular expression extractor.
Hope it helps.
Upvotes: 0