https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
s

Simon

04/06/2022, 4:21 PM
I created an integration, user, role, I have the consumer key, consumer secret, token id, token secret, I have the restlet. When I go to Postman, I'm getting { "error": { "code": "INVALID_LOGIN_ATTEMPT", "message": "Invalid login attempt." } } Something is wrong somewhere. Maybe Consumer info are wrong ? Maybe Token is wrong, maybe the role, the integration, etc... Is there's a way to test each of the "elements" ?
b

battk

04/06/2022, 4:36 PM
e

Eric B

04/06/2022, 4:44 PM
Did you provide the REALM value in Postman?
n

NickSuite

04/06/2022, 5:49 PM
Are you passing the auth to just Request Header? This is a common mistake.
r

redfishdev

04/06/2022, 6:00 PM
using oauth 1, set authorization teb, ouath 1.0, signature meth hmac sha256, set noonce to random stirng and set realm to account number (on you NS url)
e

Eric B

04/06/2022, 6:21 PM
Are you testing in sandbox first and if so are you providing the realm value as ACCOUNTID_SB1 or are you doing this -> ACCOUNTID-sb1
s

Simon

04/06/2022, 6:25 PM
I'm in Prod
I see that I have the REALM
I will find out
I will look at the Login
@battk Thanks. I see : InvalidSignature Where do I look now ?
b

battk

04/06/2022, 7:02 PM
unusul to get that if you are using postman's oauth 1 support
but it means that netsuite calculated a different signature for the authorization header
i think you only get that if your token or consumer secret are wrong
s

Simon

04/06/2022, 7:11 PM
I guess so. That's where my problem started and it's related to my initial question, how can I test the token or sonsumer key ?
b

battk

04/06/2022, 7:12 PM
you dont
you regenerate them again
and make sure you copy and store the values correctly
s

Simon

04/06/2022, 7:13 PM
I already did it 3 times 😞
b

battk

04/06/2022, 7:21 PM
what does your authorization settings for postman look like
e

Eric B

04/06/2022, 7:24 PM
are you doing a GET or a POST? if you're doing a POST are you trying to create a record or update a record?
s

Simon

04/06/2022, 7:26 PM
message has been deleted
e

Eric B

04/06/2022, 7:27 PM
it looks like you're using HMAC-SHA1 use HMAC-SHA256 since the former will be deprecated
s

Simon

04/06/2022, 7:30 PM
Same result 😞 Back to my original question : Is there's a way to test this process step by step ?
e

Eric B

04/06/2022, 7:33 PM
you still haven't answered - GET or POST?
Add Content-Type : application/json to the header
are you adding the authentication to the Request Headers instead of the Request Body?
s

Simon

04/06/2022, 7:38 PM
I tried both. I have another request that works exactly the same for another customer and no problem. I have always the same error
message has been deleted
b

battk

04/06/2022, 7:39 PM
how old is this integration?
s

Simon

04/06/2022, 7:39 PM
couple of hours
I repeated the same step as the previous customer. Do I have to set other things on Netsuite, other than users, roles, integration ?
b

battk

04/06/2022, 7:40 PM
you shouldnt be getting invalid signature if the signature method is wrong
s

Simon

04/06/2022, 7:41 PM
Personally I don;t know how tool than Postman, anyone of you knows one ?
Thanks everyone. I found the problem. there's was a problem in the restlet.
e

Eric B

04/07/2022, 8:12 PM
What specific issue gave you the INVALID_LOGIN_ATTEMPT message?