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

The client credentials will be provided for an application which will to integrate the authorization flow.
Method: POST
Now to integrate authorization flow with shopclues, please follow below step to get it done.

Step 1: Create the below URL for authorization using dynamic variable using the following mechanism

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

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

Once you hit this url, it will redirect you to shopclues login page for authorization.
User needs to log-in over there and once successfully logged in, they will be asked for confirmation whether or not you want to allow the application to access your shopclues API data.
Once access is allowed, shopclues 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: Using the temporary code in your redirect_uri, you need to hit authorize API on the shopclues server using below format.

Step 3: Now the application will have access_token for the particular user who has logged-in using this application.
This token can be stored by application for one year and it will help the application to get API response of that particular user indefinitely.


Example of Mechanism :

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


Example of client credentials

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



Production Url-
https://auth.shopclues.com/authorize/index.php?token=0e196ab3480168faaf8b******b74b704dfd7&client_id=45****56&key=1439813599



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



Request:

Authorization Url(Production):
https://auth.shopclues.com/authorizeToken.php
Authorization Url(Sandbox):
https://sandbox.shopclues.com/authorize/authorizeToken.php

Params:

  client_id: XYZABC
  client_secret: XYZ
  code: 3faad5858cb4bbd9a867c5f0d8b259f3a932ce83
  grant_type: authorization_code


The following response will be generated:


Response:

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

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.