How to obtain Access/Refresh tokens

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
HI,
   I've been using this recently  from : https://github.com/SevenSpikes/nopCommerce-Api-SampleApplication
         but NopCommerce remind me that the page is not found
   And now How to resolve this problem.
   Thank you
6 years ago
Hi,

Please check if the API plugin is enabled from API -> Settings.
You can also enable swagger and go to YourStoreUrl/swagger to check if the API is active.

Do you have any errors related to the API plugin in the System Log?

Regards,
Stoyan
6 years ago
Hi,

The API settings have been checked.
And System Log :

The controller for path '/__browserLink/requestData/11dc9bf69d694827ae36fde0102e68e4' was not found or does not implement IController.



Thank you
6 years ago
Nop-Templates.com wrote:
Hi,

Please check if the API plugin is enabled from API -> Settings.
You can also enable swagger and go to YourStoreUrl/swagger to check if the API is active.

Do you have any errors related to the API plugin in the System Log?

Regards,
Stoyan




can you plz explain what is the use of (Api client) in this plugin?

i read the doc on github but not understanding the use or how to use.

there is one place in api settings to add new Api client but what is the call back url?

can you give me one example plz?
6 years ago
Hi,

@Clear Are you sure that this error is related to the API plugin?

@pepper In the API plugin description, you will find information what you can do with the plugin.
The callback URL is the URL where the access token will be sent.

Regards,
Stoyan
6 years ago
Nop-Templates.com wrote:
Hi,


@pepper In the API plugin description, you will find information what you can do with the plugin.
The callback URL is the URL where the access token will be sent.

Regards,
Stoyan


stoyan thax for reply

i understand the use of plugin but not understanding how callback url is used.

i even read this https://github.com/SevenSpikes/nopCommerce-Api-SampleApplication

if u can plz give 1 example for when to add or create new Api client and how to use it and what should be the call back url in ur example?

any small example will be ok
6 years ago
Hi,

When you run the sample application the Redirect URL field will be automatically populated. You have to copy this URL and paste it to the API Callback URL field.

Follow this steps to see how the authorization process is working.

Regards,
Stoyan
6 years ago
thanx stoyan

if i use api in different places for different things like customer, order, products

so i need api client for each request and page where api is used to request NOP data and add call back url for each request page?
6 years ago
Hi,

Once you have retrieved the Access Token you can use it for as many requests as you want. It is not necessary to create a new client for each request.

Please note that the Access Token has an expiration date. When you authorize your client you will receive Access Token and Refresh Token. When the Access Token expires you can use the Refresh Token to obtain a new Access Token.

Regards,
Stoyan
6 years ago
Nop-Templates.com wrote:
Hi,

Once you have retrieved the Access Token you can use it for as many requests as you want. It is not necessary to create a new client for each request.

Please note that the Access Token has an expiration date. When you authorize your client you will receive Access Token and Refresh Token. When the Access Token expires you can use the Refresh Token to obtain a new Access Token.

Regards,
Stoyan


ok so call back url is not limited to one? when i create 1 client id access token even if i mention one call url the access codes can be used for more than one call back urls?

let me know if this is correct?

because there is only 1 lpace to add one call back url i was thinking that one token is for one call back url only.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.