0

I have never used Jmeter before. I have been trying to use Jmeter to send an HTTP request to Google Vision API - but it's returning a FORBIDDEN (403) error. My request as well as required response is in JSON format.
I have attached below the:
a) HTTP Request
b) Response Error

Other than this, in HTTP Header Manager I have set:
Content-Type: application/json

What is wrong with the attached request?
Request image..
Response error image

Saad
  • 11
  • 6

1 Answers1

1

According to Authenticating to the Cloud Vision API article you might require to provide OAuth token, it can be done via HTTP Header Manager like:

  • Name: Authorization
  • Value: Bearer YOUR_ACCESS_TOKEN

See How to Run Performance Tests on OAuth Secured Apps with JMeter article for more details on interacting with OAuth-protected web applications in JMeter tests.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thanks, that was indeed required. I generated and added my access token. But the 403 error remains as it is. Response: { "error": { "code": 403, "message": "SSL is required to perform this operation.", "status": "PERMISSION_DENIED" } } – Saad Jun 14 '17 at 11:13
  • Okay it worked. It was a simple matter of using HTTPS instead of HTTP. *feels stupid* – Saad Jun 14 '17 at 11:19