Jump to content
McKay Development

Check user's details before sending an offer.

Recommended Posts

Hello. I've seen many topics about offer.getUserDetails, but i can't understand how it works. All the time i try to send offer to a user that has no mobile steam guard or wrong token for example, im getting error, thrown by getUserDetails, but i can't get the type of this error. For example:
 Error: There was an error sending your trade offer.  Please try again later. Username is not available to trade. More information will be shown to Username if they invite you to trade.

Or (wrong token):  Error: Trade Offers can only be sent to friends.  Username is not on your Steam friends list.

I want to catch that error and show the user what the problem is, like 

 if(err.type == "not_friends") 

 console.log("Check your tradelink!");

else if(err.type == "no_mobile")

 console.log("Please use mobile steam guard auth in order to receive offers.");

If there is other way than the one im using, please share. 

Im currently using:

var SendToUser = manager.createOffer(row[0].userid);

SendToUser.getUserDetails(function(err, me, them) {
                if (err) {
                    console.log("getUserDetails Error:" +err);



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...