"I was just Joshin' ya"...?

I came across a story about the origin of the phrase “I was just Joshin’ ya”. It had to do with the racketeer nickel of 1883. Apparently the fellow who started the craze of gold plating 1883 liberty nickels and passing them as $5 coins was named Josh, and at some point when the cops caught on, the suspect would tell the cops “I was just Joshin’ ya”.

Is there any truth to that story? I know the gold plating scheme is true, but what about the Joshin’ part?

The Word Detective says:

He mentions a different possible origin too, if you want to check it out.