I created an integration, user, role, I have the c...
# suitescript
s
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
e
Did you provide the REALM value in Postman?
n
Are you passing the auth to just Request Header? This is a common mistake.
r
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
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
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
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
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
you dont
you regenerate them again
and make sure you copy and store the values correctly
s
I already did it 3 times 😞
b
what does your authorization settings for postman look like
e
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
message has been deleted
e
it looks like you're using HMAC-SHA1 use HMAC-SHA256 since the former will be deprecated
s
Same result 😞 Back to my original question : Is there's a way to test this process step by step ?
e
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
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
how old is this integration?
s
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
you shouldnt be getting invalid signature if the signature method is wrong
s
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
What specific issue gave you the INVALID_LOGIN_ATTEMPT message?