Netsuite API authenticate validation - node.js

I have sample mobile app with username and password authentication,need to valid my sample app username & password exists in netsuite based website. Please provide API info and steps to access netsuite based user info to valid my app login, currently we are using nodeJS API in app. I mean if signup/existing customer from my app would exists or not in netsuite based website
Any help appreciated !

If you are trying to log in as a customer or employee you need to ensure the records have login access, and credentials set, in NetSuite.
Not completely sure from your post if you are trying to log them in, or just access your NetSuite instance and see if they exist in the NetSuite instance, though.
Can you provide more information, and clearly state what you have tried? Code samples are a very nice thing to include, along with the errors you are receiving.

Related

How can multiple different users use the same rest api on a platform to pull their unique data?

I want to build a project where a user will be able to press on a button to authorize my platform to access their data (e.g shopify data). When my platform has access (to their shopify platform) it will send that data to my database.
My questions is:
In order for my rest api to access the data (from e.g shopify platform) i have to give the rest api the api key of the user which is simple if it a single account, but when i have multiple users using the same rest api how should i handle it? How can i give the rest api the access code so it can pull the data (from e.g their shopify platform) for each user? What is the name of the technology that needs to be considered here?
I am a built lost on the terminology of my question which has given me a bit of a headache when trying to google it.
First off, you create an App that Shopify approves, and then your merchant customers would install this App in their store. That approval process by both Shopify and the merchant means you are given permission to access their Shopify data.
Next, you create some value by allowing the merchant to see their data in ways unique to what it is you are doing. So far, your database contains nothing but the name of the store and the access token with permission to access the Shopify API.
How you then proceed in your own App is up to you. Not much else to it really, if you already know what your value add is. Code that part up and you're done!

Can I create a quickbooks invoice on behalf of another user, in their account?

I am following Intuit's oAuth authentication guide in order to log users in through Quickbooks and get access/refresh tokens in order to make API calls. We make API calls in node through the node-quickbooks SDK.
I can successfully log users in through Quickbooks and exchange codes I receive for access and refresh tokens, and I can even make API calls to create invoices successfully.
The problem is, even when I use the tokens of the user I've authenticated to make API calls, the invoice is created in our Quickbooks company instead of theirs.
Is it possible to create invoices in the Quickbooks account of the other user? If not, what's the point of getting access and refresh tokens for them in the first place? For what it's worth, this is all being done in the Quickbooks developer sandbox (but with two separate accounts).
I'm quite confused as to what the methodology is supposed to be here, and any guidance would be very much appreciated -- or even just a reassurance that this is possible.
Thank you!
The QuickBooks instance that's acted on is determined by the Realm ID parameter. The Realm ID is captured when a QuickBooks Online account is selected during the authorization flow.
If we could call your Quickbooks company "Company A" and the one you're trying to create invoices in "Company B", I'd say it sounds like Company A's Realm ID is being logged and passed in subsequent requests instead of Company B's. This could be caused by things by hard-coding Company A's Realm ID and using that for the create invoices requests, selecting the wrong account during the authorization process, or something trickier like a bug in the SDK you're using.
I'd start by getting Company A and B's Company ID, which is what Intuit calls the Realm ID when you access it from the UI. You can do that while logged into a sandbox or production account by pressing Ctrl + Alt + ? in Windows or Control + Option + ? in macOS. Then you can verify the correct Realm ID is being used in the create invoice requests.
If the requests are using the value captured during authentication (as they should be), then you can —in the SDK code— log the Realm ID that's being captured during authorization and verify it's the right one for the company you selected during the OAuth flow.

get profile picture of logged in user on Instagram

I am trying to use Instagram Basic Display API (V2) to get username and user profile picture of user who logs into application.
I have given necessary permissions to the application for eg. instagram_user_profile & instagram_user_media, I am successfully getting username of the user but i am not getting any API end point which will return me user's profile picture.
following is the link I am referring to for Instagram Basic Display API
https://developers.facebook.com/docs/instagram-basic-display-api
I have tried to query the media node using following GET api listed in the documentation https://graph.instagram.com/{userid}/media?access_token=IGQV....
But in response i am able to get only data of Instagram POST of logged in user.
I'm having the same issue. Instagram Basic Display doesn't provide basic info like user display name and profile picture.
Even the known workarounds, like https://www.instagram.com/USERNAME/?__a=1, are not fully working anymore (think they added some IP filtering, because it works from my machine but if I deploy to an AWS Lambda it doesn't).
The only official way to get the user info that I know is the Instagram Graph API, but it's only for Instagram Business :(

Netsuite Token Based Authentication (TBA) with PHPToolkit?

Does anyone have a working sample using Token Based Authentication with the Netsuite PHP Toolkit (Version 2017_1)? I have it working with User/Request based authentication using the sample files but need to move over to token based. I have generated both the consumer and user-based keys, and the integration works with my user/password.
I keep getting the error of "Your connection has timed out. Please log in again." The keys generated are brand new. Does anyone have any trouble with this integration that sounds similar to this?
Try creating a new login passport before each request made to the NetSuite API.
I work with C#, but had the same issue when I initially switched over to TBA. I have a method which creates the token passport and adds it to my NetSuite service object. I then call this method before each API call.
I hope this helps!

Save stripe customer details for a project

I am working on a project where I have integrated stripe connect which is working fine, but now the problem is how I can check that returned details on redirect url are for a specific project.
Projects functions as follows.
1.Registered users add Non-Profit.
2.Connect to their stripe account to accept payments.
Stripe connect button has been placed on project addition page, users clicks on it and returned to a url (given in application) with connected users details, but on this page I have lost the project id for which user was connecting stripe account so I cant save it in database ( i assume that they needs to be saved in database to use at time of donation).
Am I doing something wrong ?
Is there any other way to get it done ?
I have used https://gist.github.com/amfeng/3507366 as reference.
After trying different code approaches and code samples available on net I found that we can use state parameter to get the respective id to which you want to connect the stripe account.
On my application iu https://connect.stripe.com/oauth/authorize?response_type=code&scope=read_write&client_id=CLIENT_ID&state=705 where state is the user ID to connect with.
To open authorization window I used window popup and connect to stripe account by filling details after authorization popup window is closed and then I used $_GET to get user id and saved it in database.

Resources