Issues with testing AMAPI

Michel
Level 2.2: Froyo

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

2 ACCEPTED SOLUTIONS

jasonbayton
Level 4.0: Ice Cream Sandwich

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).

View solution in original post

jasonbayton
Level 4.0: Ice Cream Sandwich

That looks great, wonderfully quick turnaround!

View solution in original post

12 REPLIES 12

ReeceK
Former Community Manager

Hi @Michel 

 

Hope you are well?

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

 

Reece

jasonbayton
Level 4.0: Ice Cream Sandwich

Hey @Michel 

 

What error are you getting?

 

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

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:

Michel_0-1718620097650.png

 

jasonbayton
Level 4.0: Ice Cream Sandwich

Anything below that? I get: 

 

jasonbayton_0-1718623144907.png


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

This is what I see:

 

Michel_0-1718625015102.png

 

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 

 

 

jasonbayton
Level 4.0: Ice Cream Sandwich

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).

It works! Thanks!

 

Happy to hear its not my lack of knowledge haha, thanks for helping!

 

I've created a QR code using your generator, thanks for creating it. Worked perfectly! 

ReeceK
Former Community Manager
 

Great work on this, thank you both!

 

I'll reach out to our internal teams for feedback. They might have additional questions for you, so I'll keep you updated here.

 

Thanks, Reece

ReeceK
Former Community Manager

 

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

 

 

jasonbayton
Level 4.0: Ice Cream Sandwich

That looks great, wonderfully quick turnaround!

ReeceK
Former Community Manager

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

Michel
Level 2.2: Froyo

thanks @ReeceK @Lizzie !