I have created and APP in the sandbox and granted all the permissions . But when I generate any access token via the Oauth callback url , the same token is not authorizing.
It keeps saying
{
"message": "401 Unauthorized"
}
I have created and APP in the sandbox and granted all the permissions . But when I generate any access token via the Oauth callback url , the same token is not authorizing.
It keeps saying
{
"message": "401 Unauthorized"
}
Is it possible you are trying to use the code as the token? Are you sure your request is to a sandbox and not production url? Can you provide details of the request that returns a 401 in a moderators only comment?
The developer had set the permissions after the app was installed. Please see:
https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html for troubleshooting 401s.
This is the URL structure .
https://sandbox.dev.clover.com/v3/merchants/xxxxxxxxxxxx/orders?access_token=xxxx-xxx-xxxx-xxxx-xxxxxxxxxxxxxxx
body: {"customers":[{"merchant":{"id":"xxxxxxxxxxxx"},"orders":[],"metadata":{},"id":"cust12345","firstName":"Souvik","lastName":"Bose","marketingAllowed":true}],"lineItems":[{"item":{"id":"4DR5FK58ZVK6P"},"exchangedLineItem":{},"refund":{"orderRef":{},"device":{},"payment":{},"employee":{},"overrideMerchantTender":{},"serviceChargeAmount":{},"germanInfo":{},"appTracking":{},"cardTransaction":{"extra":{},"vaultedCard":{}},"transactionInfo":{"identityDocument":{"payment":{}},"promotionalMessage":{},"eCommTransactionInfo":{"storedCredentials":{}},"sepaElvTransactionInfo":{}},"merchant":{}},"printGroup":{},"id":"1","name":"Green Apple","price":20,"priceWithModifiers":20,"priceWithModifiersAndItemAndOrderDiscounts":20,"unitQty":1,"unitName":"lb","itemCode":"ITEM001","printed":true}]}
output :
{
"message": "401 Unauthorized"
}
Some points to be noted :
Are you certain you are not using the code as the token? Are you certain that you didn't modify the app permissions AFTER you installed the app? If so you need to uninstall and re-install the app and then generate a new token.
The first thing I am pretty sure. The second thing how do i uninstall the app and reinstall ?
1 Person is following this question.