Bigcommerce API Blog Posts

Failed to check outdated base auth api ...

I want to mature in nodejs or php for a blog interface, but I cannot get cURL to work correctly.

I believe that I follow their docs ... but who knows.

curl --request POST \
    -H "Content-Type: application/json" \
    -u "user:key" \
    -d '{"title": "title", "content": "content"}' \
    https://myteststoreurl.mybigcommerce.com/api/v2/blog/posts

I get an empty answer when I try to do the following with information about my person added to ...

When i started

curl --request GET \
    -H "Content-Type: application/json" \
    -u "user:key" \
    https://myteststoreurl.mybigcommerce.com/api/v2/blog/posts

I correctly receive all current messages. But POST will not work. In addition, when updating a message using PUT, it deletes the message from the interface, but sends the change, which I can check by running the get request.

Any Bigcommerce specialists help here?

+4
source share
4

, . -d.

-d "{title\": \"title\", \"content\": \"content\"}"

-v, , .

+1

API Bigcommerce. curl, 500 . -v, .

+2

. d . .

curl --request POST \ 
    -H "Content-Type: application/json" \ 
    -u "user:key" \ 
    -d '{"title": "title", "content": "content"}' \ 
    https://myteststoreurl.mybigcommerce.com/api/v2/blog/posts
+1

- Advanced REST client ( Chrome) https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

If you still get the same error, most likely this is a problem with the Bigcommerce API.

enter image description here

0
source

Source: https://habr.com/ru/post/1531887/


All Articles