Hi
I am trying to create a developer app thru a proxy and asigning product to it. If i open trace and copy the exact body of service callout and run thru apigee management API UI, It works fine. If I am doing it through my proxy, developer app is created but there is no product attached to it. Can anyone help?
{ "name" : "Test1", "apiProducts": ["product-v1"], "keyExpiresIn" : "-1", "callbackUrl" : "https://test.com", "attributes" : [ { "name" : "DisplayName", "value" : "Test1" }, { "name" : "Notes", "value" : "Test" } ] }
My code:
POST
https://api.enterprise.apigee.com/v1/organizations/{organization.name}/developers/{email}/apps
{ "name" : "{client_name}", "apiProducts": {allowedProducts}, "keyExpiresIn" : "-1", "callbackUrl" : "{requestRedirectUris}", , "attributes" : [ { "name" : "Notes", "value" : "Test" }]}
value of allowedProducts in trace: ["product-v1"]
Did you implement dynamic registration endpoint using management API itself or is there any other approach possible?
Was this done for open banking
Answer by Siddharth Barahalikar
·
Sep 13, 2018 at 11:07 AM
The Create Developer App API should work fine in a proxy. But it is not recommended to use Management APIs in proxies. Please tell us your requirement, they may be some other alternatives.
Anyway in the proxy, if you are using Service Callout(SC) policy, did you add contentType in payload? I hope you have a Product with name product-v1.(anyway without it you will get 404 error)
Just to check, I have done it through a proxy, it creates App & associates a product to it. So if possible provide your SC policy config & the final payload you see in Trace, mask confidential data.
Hi Siddharth
The reqt is to onboard a new developer app thru a dynamic registration endpoint(proxy in this case) and yes I have set contentType in payload as well as added as header also
SC.Create.DevApp false
application/json Basic {private.TECHNICAL_USER_CREDENTIALS} POST { "name" : "{client_name}", "apiProducts": {allowedProducts}, "keyExpiresIn" : "-1", "callbackUrl" : "{requestRedirectUris}", "attributes" : [ { "name" : "Notes", "value" : "Ob TPP" } ] } devAppResponse https://api.enterprise.apigee.com/v1/organizations/{organization.name}/developers/{email}/apps>For onboarding developer & creating app, why not use a developer portal?
--
In the payload did you try with a static value in "apiProducts": ["apiProduct"]?
Are you certain that
"apiProducts": {allowedProducts},
...resolves into something that looks like
"apiProducts": [ "product1", "product2", "product3" ],
??
To check, you could use an additional AssignMessage policy that mirrors what you are using in the ServiceCallout. Just assign using the same template into an arbitrary new request message.
You said "developer app is created but there is no product attached to it" . Can you show us the response payload?
Finally, Siddharth said it. But just in case you missed it, take good care when you use Management APIs in proxies.
Management API call to delete a product associated to an app 1 Answer
How do I revoke developer apps on the basis of the apikey only 2 Answers
Ip Whitelisting for Apigee management APIS 4 Answers
Management API calls returns 504 error sometimes 1 Answer
Metadata standards used to describe the API services 1 Answer