Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid Login attempt while accessing Netsuite using RESTlet?

Tags:

netsuite

I am trying to get data from Netsuite using RESTlet. For that, i am using the following details in PHP:

  1. Consumer Key
  2. Consumer Secret
  3. Script Id
  4. Deploy Id
  5. Access Token Id
  6. Access Token Secret

At first time of using these details, i got that error is Invalid login attempt. I found why it is coming , because of the following any one or all of the wrong details.

  1. Consumer Key
  2. Consumer Secret
  3. Access Token Id
  4. Access Token Secret

After giving correct details it works fine and i stored all these details in DB. I didn't change anything. But after few days i am getting the same error.

I want to know whether the access token will expire after some days or why the error is coming.

like image 750
Prabhu Avatar asked Apr 27 '16 18:04

Prabhu


1 Answers

I recently had similar issue, everything worked on my machine, but fail with same exception on the test server. Carefully debugged and saw that timestamps for generating request access token are with 12 min difference. After synching times everything went fine. So even token definitions in NetSuite doesn't expires, timestamps for generating request tokens must be in 'some' time-window with time in the NetSuite environment.

Too bad that SuiteAnswers (https://netsuite.custhelp.com/app/answers/detail/a_id/44241/kw/44241) doesn't mention anything about time.

like image 76
borkomi Avatar answered Sep 24 '22 15:09

borkomi