Best answer

Session Auth with grant_type set to client_credentials

  • 24 December 2020
  • 4 replies
  • 514 views

Userlevel 3
Badge +1

I am working on a custom app for Striven. Striven API docs (https://api.striven.com/Help) says Authentication is OAuth 2.0 but since it uses grant_type = client_credentials, Session Auth is what I am using in Zapier App builder. I was able to get access_token via Postman but can’t seem to work it out on Zapier.
 

Postman: Collection Oauth 2.0
Token Exchange Endpoint
Test Endpoint

 

icon

Best answer by ikbelkirasan 25 December 2020, 00:18

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 3
Badge +1

Update: I know where the problem is. Client Authentication is sent as a Basic Auth header whereas in the screenshots shared above, you will see I am sending client credentials in the body which is wrong.

Can anyone tell me how I can send Client Auth in request header?

I tried sending them like this

headers: {
'content-type': 'application/x-www-form-urlencoded',
'Authorization': `Basic ${bundle.authData.client_id}:${bundle.authData.client_secret}`
}


cc: @ikbelkirasan 

Userlevel 7
Badge +12

@adilalich - Try this one:

headers: {
"content-type": "application/x-www-form-urlencoded",
Authorization: `Basic ${Buffer.from(
`${bundle.authData.client_id}:${bundle.authData.client_secret}`
).toString("base64")}`,
}

 

Userlevel 3
Badge +1

@ikbelkirasan You legend! Thank you brother.

Userlevel 7
Badge +12

@adilalich You’re very welcome! :)