Announcements

Help Wizard

Step 1

NEXT STEP

"Client ID not found" for Spotify app

"Client ID not found" for Spotify app

I've created a Spotify app for Spotify Ads in my developer dashboard and am able to successfully connect to it via OAuth without any issue. I see it in the connected Apps list when I log in to Spotify and navigate to https://www.spotify.com/us/account/apps/

 

However, when I then run any API request using that OAuth connection, e.g. a request to https://api-partner.spotify.com/ads/v1.3/currentUser/adAccounts, I always get this error:

{"error":{"type":"NotFound","message":"Client ID not found.","errors":[],"sp_trace_id":"e108becb-f615-4d8d-bde3-efc3003f1613"}}
 
I've doubled/triple-checked the client ID and it's correct (and presumably wouldn't let me connect in the first place if it were incorrect). Any ideas?

 

Reply
17 Replies

Can you provide some code in which you are using the client id including code you think it may cause the problem?

(I don't use the Spotify adds myself, but I'll definitely have a look at it.)

Thank you for your respones and offering to check the code, but I'm using a no-code API connector tool, sort of like Postman, that automatically applies the OAuth2 authorization code flow. So the only moving parts are the Client ID/secret and the OAuth URLs. This is the setup:

Auth URL: https://accounts.spotify.com/authorize?scope=streaming

Token URL: https://accounts.spotify.com/api/token

Client ID and secret come from my Spotify developer app.

 

The authentication piece seems fine as it connects without any error message and appears in my connected apps list on both Spotify's side and my own side. I also originally configured this exact setup in my client account, where it worked, it just doesn't work in mine. So I'm wondering if only 1 app can be connected to an Ads Manager account or use the same redirect URL or something like that. I couldn't find anything like that in the documentation, though.

 

Thank you for your respones and offering to check the code, but I'm using a no-code API connector tool, sort of like Postman, that automatically applies the OAuth2 authorization code flow. So the only moving parts are the Client ID/secret and the OAuth URLs. 

Same here... here is my request to the api (the one in the example docs: https://developer.spotify.com/documentation/ads-api/reference/#/operations/get_adAccounts😞

 

curl --request GET \

--header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXX' \
--header 'Content-Type: application/json'
 
It always returns 
 
{
    "error": {
        "type": "NotFound",
        "message": "Client ID not found.",
        "errors":[],
        "sp_trace_id": "xxxxxxxxxxxxxxxxxxxx"
    }
}
 
Just in case it would be important... when i retrieve bearer token (main one and refreshed ones) it returns scope "streaming" only.
 
{
    "access_token""XXX",
    "token_type""Bearer",
    "expires_in"3600,
    "scope""streaming"
}
 
Am i missinsg something? maybe in app configuration? just followed steps from https://developer.spotify.com/documentation/ads-api/quick-start/
 
Thank you in advance

Hi @Alvarete,

I don't see you specify a scope. Here is a list if them: Authorization Scopes. (Maybe not a full list, because I don't see streaming on that page.)

For both of you: there is a Support email address on this page: Ads API | Spotify for Developers

Hi there,

 

Can you please confirm that you have completed all of the steps listed here (including signing the API Terms & Conditions with your valid client ID).

 

Thanks,

Charlotte

In my case that was the problem. I assumed that approving t&c on app creation was the same step and those are different ones.

 

Thank you so much

@charlotte48

I have definitely accepted terms and conditions, but I continue to have the same error as described here

Hi there -- can you confirm that you accepted the Ad Studio API Terms & Conditions: https://adstudio.spotify.com/api-terms

(these are separate from our clickthrough Developer terms)

@charlotte,
yes, this is exactly what I am mentioning above. I have accepted the terms and condition.
The only API GET request that is not erroring out for me is a web api request 

 

 

curl -X "GET" "https://api.spotify.com/v1/me" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN"

 

 

 

when I try in terminal or in our ETL tool to connect to 

 

 

curl --request GET --url https://api-partner.spotify.com/ads-sandbox/v1/currentUser/adAccounts --header 'authorization: Bearer ACCESS_TOKEN'

 

 

I get 

 

 

{"error":{"type":"NotFound","message":"Client ID not found. Please make sure you have signed the API Terms & Conditions here: https://adstudio.spotify.com/api-terms.","errors":[],"sp_trace_id":"XXXX"}}

 

 

 

Screenshot 2022-12-06 at 8.50.20 AM.png

Hi there -- our sandbox environment is still in beta and only available for certain users -- can you please update the url to call our production environment and let me know if that works? You just need to replace "ads-sandbox" with "ads" in the base url.

This worked, Thanks!

can you please help with web playback API not working at all?

 

there are two threads on the forum and i have sent an e-mail as well?

 

we cannot play anyhting at all in our app

Did you ever figure this out? Running into the same issue as well.

Im also getting this error. 

url https://api-partner.spotify.com/ads/v1.4/currentUser/adAccounts

 

{
"json": {
"error": {
"errors": [],
"message": "Client ID not found. Please make sure you have signed the API Terms & Conditions here: https://adstudio.spotify.com/api-terms.",
"sp_trace_id": "ecd8b0ef-eba1-48e0-ba85-8dcb65f5f467",
"type": "NotFound"
}
},
"status": 404
}

Hi all -- this error typically occurs when the user has missed a step in the Quick Start guide.

 

Please read through and ensure that you have completed all steps, including creating an Ad Studio account and signing the API terms. The credentials you are using to auth your API request should be the same as those associated with your Ad Studio account.

 

NOTE: It may take up to 1 hour for your client ID to be allowlisted after you have signed the API terms.

Suggested posts