Solving the Mystery: How to fix "This action requires merchant approval for read_checkouts scope" Error on Shopify REST Admin API GET Request - shopify

I'm going through a weird error when making a simple GET request using the Shopify REST Admin API. When I query with a GET request {store_url}/admin/checkouts.json I can get all the checkouts. Now, when I query admin/api/2023-01/checkouts/<checkout_token>.json I get this error { "errors": "[API] This action requires merchant approval for read_checkouts scope." }
I'm using the same store, same key. Its access scope is read_orders, a custom/private app.
Any clue?
I tried swapping using the checkout id, checkout token, checkout key. I also tried calling the orders endpoint using the checkout token and id. No luck so far.

Your App does not have the needed scope read_checkouts
If you add that scope to the App your call to the checkout endpoint will work.

Related

Is there a way to request Stripe for the cancellation reason of a subscription via API?

I am trying to query stripe for the cancellation reason of a subscription to feed this information into our CRM system.
The information I am looking for can be found in the dashboard here:
Stripe dashboard image
I found out that the browser sends a request to https://dashboard.stripe.com/v1/subscriptions/sub_xxx but with an API key that seems to belong to user request: uk_xxx. When I send a GET request to that endpoint with my API key sk_live_xxx I dont get the same data, i.e. the following information is missing:
{
"customer_portal_data": {
"cancellation_reason": "too_expensive",
"cancellation_reason_text": null
}
}
My question now: is there a way to query this information via the standard API from stripe?
This feature is only available in the Dashboard and Sigma right now and is not available via the API.

Load instagram images from user's feed via API

I am trying to display only the images the client uploaded to instagram on their website. The client's user ID# is 176722013. According to the API this URL will provide just such a feed:
https://api.instagram.com/v1/users/176722013/media/recent
As indicated by the error message, I need to provide either a client_id or an auth_token. Since I don't want to deal with authentication I went ahead and created an "app" in instagram developers to get a client_id # 5b5a6e95469f465f9f70e4ebcf9ee3a6
Yet when I add it to the URL I still get an error that I needed to provide an auth_token. How does that make sense?
https://api.instagram.com/v1/users/176722013/media/recent?client_id=5b5a6e95469f465f9f70e4ebcf9ee3a6
The app is in sandbox mode. When I attempt to submit it for review I must provide the purpose for the app. Upon selecting " I want to display my Instagram posts on my website." as the purpose I get the following message:
You do not need to submit for review for this use case. If you are a
developer and you want to display Instagram content on your website,
then you do not need to submit your app for review. By using a client
in sandbox mode, you can still access the last 20 media of any sandbox
user that grants you permission.
I am truly at a loss for how to proceed. Thanks for any support
As of June 1st, 2016, you need access_token to access API, where did u read: either a client_id or an auth_token ?
authenticate and get access_token and use to get API response.
#snucky you don't need authentication but you do need the users permission - from what I gather, instagram is accessible only by registered users - so you still need the access token - but instead of a server-explicit you need client-implicit.
Make a http request from your client to the api/authorize with the ?client_id=ID AND A redirect_uri=http://yoursite.com/ when the user allows the application, you'll receive an access_token in the url, which you will then use in every subsquent instagram call
read more here

Yodlee webhooks not hitting my URL

I have been reading Yodlee Docs at https://developer.yodlee.com/Yodlee_API/Webhooks for implementing webhooks
What i did is, first registered a webhook for one of my users using following end point
POST /{cobrandName}/v1/cobrand/config/notifications/events/{eventName}
Then i triggered a refresh for one of the account using following endpoint POST /{cobrandName}/v1/refresh
But seems that Yodlee doesnt hit my URL when refresh is completed or there is an error in refresh.
I also tried to add an account using FastLink to see if Yodlee hits my URL when an account is added. But it doesn't. I am not sure what exactly is the problem. Can you please help?
Although i have a dobt - Does the webhook hit only if add/edit/refresh account was done using the API and not FastLInk provided by yodlee?
I am using Account Agreegation API and Developer account for testing.
Webhook event notifications will work only when you try to add the account using YSL APIs (manually).It doesn't work with FastLink. I have been informed by Yodlee Support. They also informed me that till date they don't have any client using webhook service, which was bit scary to know.
Please find a simple example to use webhooks-
1)Subscribe event using this URL- http://webhook.info/post/FLQLMZMFJI
2)Initiate add account process
3)Open the following URL and find the refresh notifications -
http://webhook.info/#/watch/FLQLMZMFJI
Please note: As you have subscribed for webhook event now. Please unsubscribe first using
DELETE /{cobrandName}/v1/cobrand/config/notifications/events/{eventName}
Delete Subscription

Not able to get User Transaction details from Yodlee API

I'm using the http://developer.yodlee.com/TestDrive developer Test API module and using one of the 5 dummy accounts provided by Yodlee, For a particular user I have managed to add a dummy DAG bank account and one real bank account which is visible in getAllSiteAccounts details Api so its obvious that site have been added.
But while using the getUserTransactions API I'm getting error
{
"errorOccurred": "true",
"exceptionType": "com.yodlee.core.transactionsearch.exceptions.InvalidSearchIdentifierException",
"referenceCode": "_567afa0b-9d5a-4fb4-9db1-afd4f43c39c2",
"message": "Invalid argument value: com.yodlee.core.transactionsearch.TransactionSearchIdentifier#2ad082d0"
}
I also tried using the executeUserSearchRequest still didn't get any transaction details
{
"searchIdentifier": {},
"numberOfHits": 0
}
Can you please guide me If I'm using the API's correctly ?
You should use executeUserSearchRequest API to get the transactions. You should check the date range you have provided while searching for transactions and also try to remove itemAccountId.identifier and then search, you should get the transactions.
I'm having the same issue the only difference though is that I don't have any issues on DAG accounts, but when I used our production account I can't get the user transactions. I was reading this post Get all user transactions with executeUserSearchRequest and I guess the solution is to make sure that your server/code have the same timezone configuration.

Yodlee REST API: How to resolve CobrandUserAccountLockedException?

Currently, I am making the following POST call:
https://rest.developer.yodlee.com/services/srest/restserver/v1.0/authenticate/coblogin?cobrandLogin=sbCobFoo&cobrandPassword=Bar
(Note that I inserted a fake login and password for the purpose of this post). I am getting the following response:
{"Error":[{"errorDetail":"The account for user sbCobFoo is locked"}]}
I wasn't able to find anything in the Yodlee documentation, other than that this error represents CobrandUserAccountLockedException. Has any one encountered this error and/or know how to resolve it (i.e. unlock my account)?
You will need to reach out to your Yodlee Customer Service representative to get your credentials unlocked. Yodlee does not provide any API to unlock user/cobrand account(s).