Skip to main content
Michel
Level 4.0: Ice cream sandwich
June 17, 2024
Solved

Issues with testing AMAPI

  • June 17, 2024
  • 3 replies
  • 0 views

Hi all!

 

I'm want to start testing the AMAPI via the testing options provided by Google. Just to test policies that are not yet embedded in mainstream EMM solutions. 

 

I'm following this guide: Android Management API - Quickstart - Colab (google.com) as a starting point. All goes well until the step "provision a device". And cannot get a token or QR code visible. 

 

When running the code in block 22, no token is returned. 

 

I tried entering the policyname mannully but that returned a long error haha, so I'm assuming I just need to run the code and it will generate a token that I can use in block 23. Correct? If so, why is it not returning anything? 

 

Hope someone is able to help, thanks!

 

Michel

Best answer by jasonbayton

This is what I see:

 

 

the first link (please visit this url...) does not work (it returns a 404 error), or should i embed that excact link in a QR code? 

 

Haven't checked the second link since I want to enroll fully managed and not BYOD 

 

 


Ah perfect, the URL it's generating is going to Google charts which is now deprecated. 

 

@ReeceK could you please raise internally to fix the colab to use whatever Google wants to replace that with? Plenty of js libraries to generate it locally.

 

@Michel in lieu of that, the second link ends with "et=", if you copy the token after "et=" you can paste it into my generator - bayton.org/qr-generator - to generate a QR code to scan, and configure it however you please (far more than the colab offers).

3 replies

ReeceK
Level 3.0: Honeycomb
June 17, 2024

Hi @Michel 

 

Hope you are well?

Mr @jasonbayton I know you have some experience when it comes to tokens, any thoughts on this?

 

Reece

Level: 4.1: Jelly bean
June 17, 2024

Hey @Michel 

 

What error are you getting?

 

Can you output block 21, and then output what you get in block 22?

Michel
MichelAuthor
Level 4.0: Ice cream sandwich
June 17, 2024

Hey @jasonbayton ! Thanks for replying so quickly!

 

Output from block 21 (i haven't changed anything in this olock, just pressed the play button as mentioned above that block)

{'name': 'enterprises/LC02l2h7s1/policies/policy1',
 'version': '1',
 'applications': [{'packageName': 'com.google.samples.apps.iosched',
   'installType': 'FORCE_INSTALLED'}],
 'advancedSecurityOverrides': {'developerSettings': 'DEVELOPER_SETTINGS_ALLOWED'}}

 

And when pressing play in block 22, there is no output shown:

 

Level: 4.1: Jelly bean
June 17, 2024

Anything below that? I get: 

 


Then I have to hit play again on the new output to generate the URL.

ReeceK
Level 3.0: Honeycomb
June 18, 2024

 

Hey @Michel 
 

Hope you are doing well!

 

Good news—we've updated the page, and everything should be working now.

 

Could you please confirm if it's working on your end?

 

Thank you so much for bringing this to our attention. Thanks to your post, we were able to escalate the issue to the relevant teams. Also, a big thank you to @jasonbayton for your support. It's much appreciated!

 

Thanks

Reece

 

 

Level: 4.1: Jelly bean
June 18, 2024

That looks great, wonderfully quick turnaround!

ReeceK
Level 3.0: Honeycomb
June 18, 2024

Thank you to @Lizzie for leading the way in finding this solution.  😊