0

I am trying to implement Android Management API in my project where the first step is to create an enterprise:

Post the Callbackurl and ProjectID to the Following URL https://androidmanagement.googleapis.com/v1/signupUrls

I get the response name and url:

{
  "name": "signupUrls/C265d41bc093bdd97",
  "url": "https://play.google.com/work/adminsignup?token=someToken"
}

How can I Change this "url" parameter to my own. Do I require to upload my DPC to playstore?

I am out of guesses. please help

Thanks in advance.

Pradip Tilala
  • 1,715
  • 16
  • 24
Arpit116
  • 81
  • 4
  • I guess you should first spend some time on the [documentation](https://developers.google.com/android/management/introduction), which is a perfect start to find answers to your questions. – Florian Apr 10 '19 at 09:53
  • I searched it. My Logic is clear but facing issues in making it custom. – Arpit116 Apr 10 '19 at 10:45
  • You don't need to make it custom. You need someone to visit that URL and complete the enterprise creation flow. Once this is done the page will redirect to the callback URL specific when creating the signup URL. – Fred Apr 10 '19 at 16:33
  • Hi @Fred. Thank you. I would Like to connect with you for understanding the concept in detail. the docs are so confusing. – Arpit116 Apr 11 '19 at 05:09
  • I would recommend taking a look at the [Create an enterprise](https://developers.google.com/android/management/create-enterprise) guide and at the [Quickstart notebook](https://developers.google.com/android/management/quickstart). Following the quickstart notebook should allow you to easily create an enterprise. – Fred Apr 11 '19 at 12:45
  • Ok done with the enterprise. one last thing. how can i create multiple enterprises with different gmail account that are not defined in my google cloud project? – Arpit116 Apr 11 '19 at 12:53

1 Answers1

0

The flow is this:

1) Create a Project in Google developer console, enable Android Management API, create credentials and get the project id. (I think you already done that).

2) Create a SignupUrl with signupUrls.create. (What you have done to get that JSON)

3) Keep the SignupUrl Name and redirect the user (or go) to the returned URL (inside the JSON posted).

3) Follow the procedure to create an enterprise.
This will start the creation of an enterprise to the signed Google Account.

4) At the end of the procedure you will be redirected to the callbackUrl specified inside signupUrls.create. Appended to the callbackUrl, as a GET query parameter, will be a token.

5) You must use the appended token to conclude the flow calling the API enterprises.create with these parameters:

  • The signup url name
  • The enterprise token returned as parameter
  • (optional) a request body with some enterprise parameters (logo, name, etc)

At the end of this coming and going between URLs and API calls, you will end with an Enterprise created on the Google Account and the enterprise ID in the form enterprise/<yourID> to interact with the API.

You can check all the Enterprise infos at the created Google Play for Work (or Managed Google Play) at http://play.google.com/work . Left menu "Administration Settings" at check your enterpriseId.

Punkman
  • 554
  • 6
  • 15