Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to get context part in Bigcommerce auth callback request

I am working with Bigcommerce api using oauth. I am currently in development phase. I have given auth callback url as

http://localhost:3000/resource_callback.

I am unable to get store hash in context. It is only sending scope, and code. What am I missing here? Just using http instead of https is the reason? Please help me with proper direction.

like image 846
user51854 Avatar asked Nov 10 '22 07:11

user51854


1 Answers

If you are receiving the Auth Callback Request but it only has code and scope query properties then the problem is how you are installing your app. At this time it is necessary to install an app directly through your store's Control Panel, rather than using a link to do the install (as is common with most oAuth implementations). The use of a link for the install is something that will likely be added in the future but oAuth on BC right now is geared towards public applications installed through the store.

That being said, it is possible to make oAuth credentials for a store even without making it a public application. Please follow the long answer seen on this question:

Can BigCommerce Private Apps use OAuth

This will cover the full process for generating oAuth API tokens from registering an app to installing into a store and beyond. Based on your question you should start at the Generate the Auth Callback Request section. If you follow the steps there then your Auth Callback Request will include the context property as well as the other two.

Update

You can now generate oAuth tokens in a store from Advanced Settings > API Accounts. As a result it is no longer necessary to install a draft app into a store for the sole purpose of generating oAuth tokens. You will still want to do this if you are developing an app for the BC App marketplace or developing a user interface for your app that you want to live in the Control Panel of the store.

like image 87
J Z Avatar answered Nov 15 '22 05:11

J Z