JS "PEM label invalid" - Advanced Trading API

wont be too verbose but using the js code available, and replacing the necessary fields with the keys provided by coinbase ( i.e. the pem and organisation key) upon attempting to call the sign function, I get the error “Invalid PEM Label”

I’m not sure what this means, I’m assuming it means the provided pem is malformed in someway, but it is a cut and paste straight from the downloaded file after creating the key.

Anyone else had these issues with the code provided? i have changed nothing but these two vars.

1 Like

HI @SimonKay, Welcome to the forum Community.

To understand, you are using the Cloud API Trading keys authentication which has API Key Name and Private Key. You need to follow the steps mentioned here to Generate JWT and make a request: Advanced Trade API Authentication Overview | Coinbase Cloud

Can you please authenticate as per above and make a request. If you face issues - please do share more info such as screenshots of the request and the error screen, omitting personal info.

Thank you and have a nice day!

1 Like