Top
Developers Your place to code all things handmade

Welcome to the Shopclues Developer Platform

We believe in code as craft. Join the community of developers, creators and build tools that enrich the ways you can shop, sell and connect with the India's largest merchant base most easily.

Get Started

Register, Upload, Search and Connect

Explore Shopclues' marketplace of over 8.5 million products from over 3.5 lakh merchants. Connect buyers with the items they'll love.

Learn More About Catalog Management

Login, Integrate and Create

Build the best tools for Shopclues merchants. Simply login, Integrate and start developing you own apps.

Learn More About Start Developing
<
>
Jump to: navigation, search

Authorization flow integration with Shopclues

We will provide client credentials for an application which will help to integrate authorization flow.

Example

XYZ Integration
Client id: XYZABC
Client Secret: XYZ
Redirect Uri: https://www.xyz.com/redirect_url.php


Now to integrate authorization flow with shopclues, please follow below step to get it done.

Step:1

http://sandbox.shopclues.com/oauth/authorize/index.php?token=0e196ab3480168faaf8b13cb9b390b74b704dfd7&client_id=testclient1&key=1439813599

You have to prepare above mentioned url for authorization using dynamic variable using below mechanism

token =sha1('client_secret+current_time+shopclues);
key = current_time
client_id = provided client_id

Example :

token =sha1('xyz1454488919shopclues);
key = 1454488919
client_id = XYZABC

Example url: http://sandbox.shopclues.com/oauth/authorize/index.php?token=aba35bdbd8c0b7ddf8edb8d1a9ed0d66d440b741&client_id=XYZABC&key=1454488919

Once you will hit this url. it will redirect to shopclues login page for authorization.

User need to log-in over there and if successful login then it will ask for confirmation whether you wanted to allow application to access your shopclues api data or not. Once user says allow, shopclue domain will create a temporary code and will redirect to redirect_uri provided in application.

Example: https://www.xyz.com/redirect_url.php?code=3faad5858cb4bbd9a867c5f0d8b259f3a932ce83&state=1

Step 2:

now, you have temporary code in your redirect uri, using that code, you need to hit authorize api on the shopclues server using below format.

Request:

Authorization Url: https://oauth.shopclues.com/authorize/authorizeToken.php

Method: POST
Params: client_id, client_secret,code,grant_type=authorization_code

Response:

{
  "access_token": "1c8767794c64752319659ceb4c4c280facbe86aa",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "",
  "refresh_token": "df62dfe327cab11b7c632e707737b4fc2beb1e82"
}

Step 3:

Now application will be having access_token for that particular user who has logged-in using this application. and this token could be stored by application for next one year and it will help application to get api response of that particular user indefinitely.

Looking for ShopClues Apps?

Check out our new
App Gallery!

It's the best way to find cool and useful tools built upon Shopclues's API.