{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by AMAR DEVEGOWDA · Dec 04, 2015 at 03:48 PM · 740 Views consumer keymigrateconsumer secret

Creating an existing consumer key/secret in another developer app throws "ConsumerKey already exists"

I want to migrate existing consumer key/secret from one developer app to another in the same organization. So I used the following steps:

a) Obtain the existing consumer key/secret (let's say K1/S1) from the "DeveloperApp".

b) Create a new developer app "NewDeveloperApp" with some API Product. This created a new consumer key/secret (let's say K2/S2) for the "NewDeveloperApp".

c) Create consumer key/secret API for the "NewDeveloperApp" with K1/S1 (Step#1 above) using the API documented here -> http://apigee.com/docs/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_email_or_id%7D/apps/%7Bapp_name%7D/keys/create

It is also documented in this community post -> https://community.apigee.com/articles/3113/how-to-set-a-custom-api-key-for-a-product.html

d) But I get the error stating K1/S1 already exists as shown below:

{
  "code": "keymanagement.service.ConsumerKeyAlreadyExists",
  "message": "ConsumerKey already exists",
  "contexts": []
}

e) However when I fetch the details of the "NewDeveloperApp", the K1/S1 does not exist.

f) If I try to create consumer key/secret for "NewDeveloperApp" with any random values (using any value other than existing consumer key/secret), then it works fine.

Have I missed anything here ?

Can you please help me to create an existing consumer key/secret taken from one developer app in a different developer app ?

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
0
Best Answer

Answer by AMAR DEVEGOWDA · Dec 06, 2015 at 08:00 AM

We can do the following to migrate consumer key/secret from one Developer App to another Developer App within the same org:

  • Delete the "DeveloperApp" (which contains the consumer key/secret K1/S1) completely OR
  • Delete only the consumer key/secret K1/S1 from "DeveloperApp" using the API ->
    • http://apigee.com/docs/management/apis/delete/organizations/%7Borg_name%7D/developers/%7Bdeveloper_email_or_id%7D/apps/%7Bapp_name%7D/keys/%7Bconsumer_key%7D OR
  • Regenerate a new consumer key/secret for "DeveloperApp"

Post this, create the consumer key/secret K1/S1 in the "NewDeveloperApp".

In addition, I figured out the following information by doing some experiments:

  1. In a given org, same consumer key/secret cannot be part of multiple developer apps. That is, it has to be unique for every developer app in an org.
  2. The consumer key/secret from "org1" can be migrated or created in "org2" as long as it is unique in "org2".
Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image zz_gshaw@us.westfield.com · Nov 03, 2016 at 08:20 PM 0
Link

Is this process still expected to work? I'm trying to backup and restore portal data using the management APIs and find that even if I have deleted a developer I cannot restore the old key values. See https://community.apigee.com/questions/34266/using-management-apis-to-restore-a-deleted-develop.html.

avatar image
0

Answer by Marc Schreuder · Dec 04, 2015 at 07:09 PM

Hi @AMAR DEVEGOWDA

If I followed your steps above correctly, I didn't see the original consumer key being removed or regenerated from "DeveloperApp". If that is correct then that is the problem - the same key cannot be shared by multiple Developer Apps.

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AMAR DEVEGOWDA ♦ · Dec 06, 2015 at 07:24 AM 0
Link

Dear @mschreuder,

Yes it looks like the same key cannot be shared by multiple Developer Apps.

Follow this Question

Answers Answers and Comments

28 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

'Regenerate key' button no longer visible 2 Answers

Consumer Key with "." 1 Answer

change default apikey length for the on cloud version 1 Answer

Can we have two different credentials for each resources of an API Proxy in single Product in a Developer Apps 1 Answer

If I am orgadmin, and I know a consumer key, how can I find the app associated to it? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges