Shipping rates endpoint with private apps

Solved
acfernando
New Member
1 0 0

Hi all.
I'm trying to get the shipping rates for a specific checkout (I have the checkout token) using the shipping-rates endpoint from Admin Rest API for a private app.
In my requests, I'm authenticating with Shopify by including the request header X-Shopify-Access-Token: {access_token}, where {access_token} is replaced by the private app's Admin API password, like this doc pointed out.
My request: https://api_key:private_app_password@mystore.myshopify.com/admin/api/2021-07/checkouts/xyzabcdfg.jso...
But I'm getting this error as response: "errors": "[API] This action requires merchant approval for read_checkouts scope."
At private app admin web page, I don't see checkouts scope for setting up on ADMIN API PERMISSIONS session. I've found an information at Shopify community from a Shopify staff that says "Shipping-rates endpoint belongs to the Sales channel API and limited to public apps at this time".
So my question is: Can I get shipping rates from shopify's ADMIN REST API shipping-rates endpoint using a private app and using Basic HTTP authentication, and not having an access_token created like a public app?

Accepted Solution (1)

Accepted Solutions
L_J_K
Shopify Staff
360 53 65

This is an accepted solution.

Hey @acfernando 

Thanks for getting in touch! So the read_checkouts access scope belong to the Sales Channel SDK. 

Making a request to checkouts.json with a private app to poll for the rates without the scope would result in "[API] This action requires merchant approval for read_checkouts scope." 

For this, you'd need to create a public app. The read_checkouts scope would then be requested during the Oauth flow (Oauth docs here). After that, you could then turn the app into a sales channel in the app setup part of the app in the partner dashboard (screenshot). There's some documentation on the Checkout API/Sales Channel SDK here if need be.. Hope that helps!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

Reply 1 (1)
L_J_K
Shopify Staff
360 53 65

This is an accepted solution.

Hey @acfernando 

Thanks for getting in touch! So the read_checkouts access scope belong to the Sales Channel SDK. 

Making a request to checkouts.json with a private app to poll for the rates without the scope would result in "[API] This action requires merchant approval for read_checkouts scope." 

For this, you'd need to create a public app. The read_checkouts scope would then be requested during the Oauth flow (Oauth docs here). After that, you could then turn the app into a sales channel in the app setup part of the app in the partner dashboard (screenshot). There's some documentation on the Checkout API/Sales Channel SDK here if need be.. Hope that helps!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post