Expand my Community achievements bar.

Triggering https://ims-na1.adobelogin.com/ims/authorize/v1?response_type=code&client_id= returns invalid protocol

Avatar

Level 2

Hi Adobe I/O team,

 

I'm following your introduction to Adobe I/O Events Webhooks guide as I want to trigger a webhook call on certain events. However, every time I try to enable consent, as described here: https://github.com/AdobeDocs/adobeio-events/blob/stage/intro/webhooks_intro.md#receiving-events, I get the following error in postman: Invalid protocol: adobe+MY_CLIENT_ID. Any help would be greatly appreciated, since I'm a bit lost!

 

Rafael

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

22 Replies

Avatar

Employee

Hi @rgala,

If you are trying the below consent request, make sure to do the following:

  1. Replace <api_key_from_console> with your own client-id.
  2. Make sure your client-id has the requested scopes. Notice how the consent request has the AdobeID, openid and creative_sdk scopes. One trick is to add the "Creative Cloud Libraries" API which basically adds the requested scopes to your client-id.
Consent Request:
 
Also, a rendered version of the documentation lives here.

Avatar

Level 2

Hi Shikhartanwar,

 

Let me clarify that I'm using postman to trigger the consent request (using POST). Yes, I replaced api_key_from_console with my client-id. However, the result is still the same: I keep getting an invalid protocol error message in Postman. I followed your trick to add scopes to my client-id, but it did not change the outcome. Is there something I'm missing or am I doing something wrong? Thanks a lot

 

rgala_1-1671224615242.png

 

 

Avatar

Employee

Interesting. I am not sure why that is happening then.

Can you share the request you are trying to execute? Also, have you tried once with the browser (maybe Postman is not able to understand the redirects).

Avatar

Level 2

Hi Shikhartanwar,

 

Since my request contains my clientID, I would like to send it to you via PM. Is that possible? There is no response from the browser (I guess the service expects a POSt instead of a GET).

 

Avatar

Employee

No the request works from a browser, so it does expect a HTTP GET.

I am not sure how a PM is possible here. Could you instead create a dummy project mimicking the current project, and share the request for that instead? We can then delete the dummy project. 

 

Avatar

Level 2

This screenshot is from my current project and the request is now a GET instead of a POST

 

Screenshot 2022-12-19 at 14.47.55.png

 

 

 

Avatar

Employee

The screenshot doesn't provide much help in debugging this further. What if you can share a document that only I can view (my adobe email id is stanwar@adobe.com)?

Also, one of my speculation would be that this client-id is not enabled for all types of accounts. How are you logging in after you enter the consent link in the browser?

Avatar

Level 2

It's a pity that the screenshot doesn't help! So far, I haven't found a way to share an Adobe IO project with anyone. Could you please let me know where I can find that option? How can I check if all of the types are enabled in my client-id? Can I check that using an API call? I am using a browser to log in.

Avatar

Employee

Yes, you can only share projects with people who are added to your respective organization, but I don't think we need to take that route as I may have a better solution to help debug this further.

For that, I will require your event (webhook) registration-id which you can get by following the below steps:

  1. Log onto your developer-console project and corresponding workspace.
  2. Then, select the event registration that you had created.
  3. Go to the “Debug Tracing” tab.
  4. Open the developer tools window (F12 is the shortcut generally) and go to the “Network” tab of the developer tools window.
  5. Click on the “Refresh List” button in the “Debug Tracing” tab.
  6. You’ll see a “graphql” request being made with the operation “traceWebhook” in the network tab.
  7. Scroll down on the “Headers” section of the request and note the webhookId.debug.png

 

Avatar

Level 2

Hi, thanks for your help once gain! Here's the webhookid

rgala_0-1671524362652.png

 

Avatar

Employee

I think I understand what your problem is.

Are you trying the consent request with a Service Account (JWT) client-id? If yes, then can you try once with an oAuth based client-id.

Avatar

Level 2

Thanks! I gave it a quick try, but I don't have a redirect url. I get an error saying that it cannot find the redirect url when I trigger the consent call. Basically, I want my server to be notified (via using webhook call) when certain events occur, such as uploading files to my creative cloud drive.

Avatar

Employee

You can try with a generic redirect URL for now, say https://adobe.com, and give your application (client-id) the consent (see screenshot below).

This should be enough for us to forward the events to your application on your behalf.

consent-screen.png

Avatar

Level 2

My screen is different from yours. Here's what it looks like on my end:

Note, the url shows: https://www.adobe.com/?error=invalid_scope

rgala_0-1671535779717.png

 

Avatar

Employee

This generally comes when your client-id does not have the creative_sdk scope and you request for it in the consent URL. Have you added any APIs in your project?

Could you try this trick and check again?

Avatar

Level 2

That was the prob! Thanks for pointing that out!

But I'm still not receiving any webhook notifications when I trigger my events. If I go to "Debug tracking" I can't see any events. I'm I missing something else?

Avatar

Employee

The person with which you consented should be the same person who is triggering the events / performing actions on Creative Cloud.

Debug Tracing will show you the events getting delivered.

Avatar

Level 2

That is the case! I'm using my account CC + Adobe IO. Is there a way to debug this?

Avatar

Employee

I think your event registration is still against the Service Account (JWT) client-id.

Could you try creating an event-registration against the oAuth client-id and then trigger some events?

Avatar

Level 2

It is finally working! That was the "problem"! 

 

To get the webhooks working, you need all these steps...add dummy api, grab oauth clientID, consent, and then add the events you want to receive notifications from via webhook? 

Your guide --> https://github.com/AdobeDocs/adobeio-events/blob/stage/intro/webhooks_intro.md#receiving-events seemed pretty straightforward when I first read it, but to get this working is a completely different story! May I suggest that your team update the guide online? Or that you make this process much simpler?