Need to pass parameter input value to oauth properties of client_id | Community
Skip to main content

Need to pass parameter input value to oauth properties of client_id

  • August 2, 2021
  • 6 replies
  • 0 views

want to pass input value of client_id parameter dynamically to oauth properties of client id
 
{
  "oauth": {
  
    "client_id": "{{setting.client_id}}",
    "client_secret": "{{setting.client_secret}}",
    "authorize_uri": "https://www.facebook.com/v11.0/dialog/oauth",
    "scope": "public_profile,email,pages_messaging,pages_read_engagement"
  },
  "parameters": [
    {
      "name": "token",
      "type": "oauth"
    },
    {
      "name": "client_id",
      "type": "text",
      "required": true
    },
    {
      "name": "client_secret",
      "type": "text",
      "required": true
    }
  ]
}
I am getting an upload error:
 

Upload Error

The task failed because of an error: 422 Unprocessable Entity: {"errors"=>[{"status"=>"422", "code"=>"1307", "detail"=>"client id: '{{setting.client_id}}' is invalid. Only lowercase/uppercase letters, number, -, _, = and . are allowed"}]}

This topic has been closed for replies.

6 replies

Trapta
  • August 2, 2021

Hi @siva ranjani,

Have you tried

 "client_id": {{setting.client_id}},
 "client_secret": {{setting.client_secret}},
instead of
 "client_id": "{{setting.client_id}}",
 "client_secret": "{{setting.client_secret}}",
Let us know if this solves the issue.
 
Thanks

  • Author
  • August 3, 2021

Hi @Trapta

I have tried what you have suggested

But I have got an error like 

manifest is not proper JSON. 809: unexpected token at '{ "name": "Instagram", "author": { "name": "shiva", "email": "sivaranjani@jinnss.com", "url": "" }, "defaultLocale": "en", "private": true, "location": { "support": { "ticket_sidebar": "assets/iframe.html" } }, "version": "1.0", "frameworkVersion": "2.0", "oauth": { "client_id": {{setting.client_id}}, "client_secret": {{setting.client_secret}}, "authorize_uri": "https://www.facebook.com/v11.0/dialog/oauth", "access_token_uri": "https://graph.facebook.com/v11.0/oauth/access_token", "scope": "public_profile,email,pages_messaging,pages_read_engagement" }, "parameters": [ { "name": "token", "type": "oauth" }, { "name": "client_id", "type": "text", "required": true }, { "name": "client_secret", "type": "text", "required": true } ], "domainWhitelist": ["https://www.facebook.com","https://graph.facebook.com","https://d3v-identifyyou.zendesk.com","https://developers.facebook.com","https://d3v-identifyyou.zendesk.com/api/services/zis/connections/oauth/callback"] } '


  • September 6, 2021

Hi @siva ranjani, Did you find a solution to this problem? I have the same issue


  • April 6, 2022

@trapta also having the same issue, I think a guide needs to be produced on how OAuth2.0 client credentials can be set by the installer of an ZAF app.

Some ideas that are floating around are:

Using the ZIS API's to store the OAuth2.0 Credentials, and having them set by a seperate app that is private for end customers.


  • April 6, 2022

@eric27 maybe you can assist here?


Eric27
  • April 13, 2022
Hey Folks, 

At this time we don't allow for the client_id to be set as a dynamic field. Though, I've passed this along to the appropriate team as a feature request.