So James told me what had happened between you guys.

Can I use the past perfect tense in this situation?

James told me something that happened before him telling me it happening.
The first sentence is ok. (I would add a comma after so)

Its very conversational.

The 2nd sentence...has major problems.

The grammar is wrong and it has completely warped its meaning.

You have absolutely no need to say "before him telling me it happening" -->this part is where the grammar completely fell apart (I can no longer understand the meaning of this sentence).

"James told me something that (had) occurred a while back." Simple and works just fine.

" ...happend a while back."
The third part is just to explain what I'm trying to say in the first sentence.

And I don't think for the first sentence the past perfect should be used anyway. Let's see what an expert has to say.

Thanks.
Students: We have free audio pronunciation exercises.
[.....(something happened between 2 guys)..........(James told me about it).............]

past (can use past perfect) past Now

Describing the earlier past action can use the past perfect but isn't necessary.

Natural logic sugguests you cannot tell somebody something before it happens(unless its a prediction).

You can only tell someone that something had occurred earlier in the past ---- so you don't need to add the latter part of your second sentence.

For the 2nd sentence, the before... part of your sentence:
  • Since its a before clause, you can have the standard form "before (subj) + (verb) + (obj)"
or the reduced "before + Ving + (obj)" you can leave out the subj and add ing to the verb.
  • You cannot have "him" doing the action, only receiving action. (pronoun usage) Replace him with he.
  • You cannot add ing to a verb without changing it to a gerund, continuous tense, or adj.
  • You want to use it as a verb then you have to change it into the continuous tense (continuous tense requires a be verb)
    he was telling me / he had been telling me
    However, you have used 'before' which indicates the sequence of an action. You cannot use the past continuous or past perfect continuous case if you are emphasizing the sequence of two actions.