How to check oauth credentials are valid or not in Netsuite? -


i access token , secret, not working times . getting error invalid login attempt. don't know how solve issue.

i have credentials oauth , these

  1. consumer key
  2. consumer secret
  3. account id
  4. token id
  5. token secret
  6. script id
  7. deployment id

i want know oauth credentials group or individual valid or not .

i think way hit suitetalk or restlet.

if using restlet, must ensure user has access restlet in deployment options.

i have working code using java (using scribe java library) can found here

main method:

oauthconfig authconfig = new oauthconfig("consumer_key", "consumer_secret", null, signaturetype.header, null, null);     token token = new token("token_id", "token_secret");     oauth10aserviceimpl auth10aserviceimpl = new oauth10aserviceimpl(new netsuiteapi(), authconfig);     oauthrequest request = new oauthrequest(verb.get, "restlet_url");     request.setrealm("ns_account_id");     auth10aserviceimpl.signrequest(token, request);     response response = request.send(); 

also need write netsuiteapi class extending defaultapi10a

import org.scribe.builder.api.defaultapi10a; import org.scribe.model.token;  public class netsuiteapi extends defaultapi10a {  @override public string getaccesstokenendpoint() {     // todo auto-generated method stub     return null; }  @override public string getauthorizationurl(token arg0) {     // todo auto-generated method stub     return null; }  @override public string getrequesttokenendpoint() {     // todo auto-generated method stub     return null; }  } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -