Shraddha Bandekar
Shraddha Bandekar

Reputation: 406

Magento REST api authentication

Is there a way to pass login credentials from code instead of entering credentials everytime in the popup for login authorization?

Upvotes: 4

Views: 9603

Answers (2)

Cris
Cris

Reputation: 13341

You dont require login credentials every time for authorization,you'll get an access token and access secret upon successfull authorization by OAuth,use the later for further calls to the API.Oauth protocol works this way.

I guess Magento is using OAuth 1.0/1.0a,so everytime you'll authorize a user you get,

oauth_token - the Access Token that provides access to protected resources.

oauth_token_secret - the secret that is associated with the Access Token.

Upvotes: 1

coder_bro
coder_bro

Reputation: 10773

You will need to use OAUTH based authentication. Then pass the request token along with each request:

Refer: http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html

Upvotes: 0

Related Questions