How to integrate UGC reviews with a Gatsby ecommerce project?


I am trying to figure out how to integrate UGC reviews with a Gatsby ecommerce project. I’ve installed the plugin and configured the app key and secret.


Currently, I don’t have any reviews so I tried to POST one using VS Code’s REST Client. Below is the POST request.


POST /v1/widget/reviews HTTP/1.1
Accept: application/json
Content-Type: application/json

@appKey={{$processEnv GATSBY_YOTPO_APP_KEY}}

"appkey": "{{appKey}}",
"sku": "prod_01G0V7ZAXNFTYBFY5H8Z4SS0JG",
"product_title": "Medusa T-Shirt",
"product_description": "Reimagine the feeling of a classic T-shirt. With our cotton T-shirts, everyday essentials no longer have to be ordinary.",
"product_url": "",
"product_image_url": "",
"display_name": "John Smith",
"email": "",
"is_incentivized": true,
"review_content": "It’s really good. Fits nicely",
"review_title": "Great T-Shirt",
"review_score": 5

However, I received the following response:

HTTP/1.1 301 Moved Permanently
Server: awselb/2.0
Date: Wed, 20 Apr 2022 11:20:39 GMT
Content-Type: text/html
Content-Length: 134
Connection: close

<head><title>301 Moved Permanently</title></head>
<center><h1>301 Moved Permanently</h1></center>

The ecommerce server and storefront are both running locally. Kindly let me know what I could be doing wrong.


Thanks in advance.


Best answer by Kristie from Yotpo 20 April 2022, 19:06

View original

2 replies

Userlevel 2
Badge +3

It looks like you are trying to make an HTTP request using an old protocol that we don't allow anymore for security reasons. We have opened a support ticket on your behalf and you should get outreach from our support team shortly. You can also go through Gatsby for additional support with the integration. 



I see. I got the POST URL from the UGC API docs.