• Resolved NameRequired

    (@agustin8_4)


    I tried in multiple ways based on this thread

    https://www.ads-software.com/support/topic/wp-rest-api-support-6/

    And on the documentation (which is barely explained for PUT request)

    Using the exact same consumer Key and consumer Secret, the GET request works, but the PUT requests says “{“code”:”rest_forbidden”,”message”:”Sorry, your key details are incorrect.”,”data”:{“status”:401}}”

    2
    1

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP Swings

    (@wpswings)

    Hello ,

    Thank you for using our plugin,

    In reference to your query, could you please share the endpoint and JSON data you are adding for updating the user wallet

    Thank you

    Thread Starter NameRequired

    (@agustin8_4)

    Sure, sorry I thought it was visible in the attached images.

    Endpoint for GET:

    /wp-json/wsfw-route/v1/wallet/1?consumer_key=XXX&consumer_secret=XXX

    (this worked for getting the wallet amount for user ID:1)

    Endpoint for PUT:

    /wp-json/wsfw-route/v1/wallet/1?consumer_key=XXX&consumer_secret=XXX&amount=1&action=debit&transaction_detail=123

    (I tested multiple variations, but basically these 3 params)

    Plugin Author WP Swings

    (@wpswings)

    Hello @agustin8_4
    Please use this below JSON Data and then check:
    Update wallet JSON data:
    {
    “amount”:”100″,
    “action”:”credit”,
    “consumer_key”:””,
    “consumer_secret”:””,
    “transaction_detail”:”test”
    }
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.